Rename SQL Server
During the migration of SQL databases to a new SQL Server we find that we must rename the SQL Server to the original server name. Renaming a machine on the network is easy eough but we must also run a T-SQL script to rename the server in MS-SQL
To correct @@SERVERNAME for a default instance use the following commands:
GO
exec sp_addserver new_name, ‘local’
GO
To correct @@SERVERNAME for a named instance:
GO
exec sp_addserver new_nameinstancename, ‘local’
GO

Leave a Reply
You must be logged in to post a comment.