Tuesday 25 September 2012

How to Rename SQL Server

With the release of SQL 2012 most of the companies might have started migration of SQL server to new version, In case of server migrations most of the time we will end up in a situation to rename the physical server hosting SQL Server, Renaming SQL Server to host the new physical server name is pretty simple as done below

MSDN Reference for Add Server http://msdn.microsoft.com/en-us/library/ms174411.aspx
As said in the article, This procedure must be executed on all instances of the Database Engine hosted on the computer. The instance name of the Database Engine cannot be changed.
On the SQL Server instance, run the following query.
sp_dropserver '<oldservername>'

sp_addserver '<newservername>', local

Now restart the SQL Server related services. Then, run @@servername to verify if the new name has been updated.
select @@servername

No comments:

Post a Comment