Friday, 18 November 2011

Rename the SQL Server Instance

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 'OLDSERVRNAME'
Define the name of the local instance of SQL Server.
EXEC master.dbo.sp_addserver NEWSERVERNAME, 'local'
Get the new name of the SQL Server instance for comparison.
SELECT @@servername

No comments:

Post a Comment