Rao.V (10/21/2009)
– Get the current name of the SQL Server instance for later comparison.SELECT @@servername
– Remove server from the list of known remote and linked servers on the local instance of SQL Server.
EXEC master.dbo.sp_dropserver ‘[SERVER NAME]‘
– Define the name of the local instance of SQL Server.
EXEC master.dbo.sp_addserver ‘[NEW SERVER NAME]‘, ‘local’
– Get the new name of the SQL Server instance for comparison.
SELECT @@servername
I know this is an old post, but...
After renaming the instance using sp_dropserver and sp_addserver, selecting @@SERVERNAME will not return the new, changed instance name until a sql server service restart has occurred.
_________________________________
seth delconte
http://sqlkeys.com