I encountered a problem during my sqlServer2005 experiment today. The problem is clearly described. I suspect it was caused by my previous name modification to the computer. you can use select @ servername and selectserverproperty (servername) to check whether the two results are the same.
I encountered a problem when I was doing an SQL Server 2005 experiment today. The problem is clearly described. I suspect it was caused by the name I used to change the computer. you can use select @ servername and select serverproperty ('servername') to check whether the two results are the same.
I encountered a problem when I was doing an SQL Server 2005 experiment today. The problem is clearly described. I suspect it was caused by the name I used to change the computer. you can use select @ servername and select serverproperty ('servername') to check whether the two results are the same. If they are different, the problem may occur. The following shows the SQL script to solve the problem.
The Code is as follows:
If serverproperty ('servername') <> @ servername
Begin
Declare @ server sysname
Set @ server =servername
Exec sp_dropserver @ server = @ server
Set @ server = cast (serverproperty ('servername') as sysname)
Exec sp_addserver @ server = @ server, @ local = 'local'
End
Run the SQL statement again to solve the problem.