Annotations for "Rename a Computer that Hosts a Stand-Alone Instance of SQL Server" topic.Fri, 18 Aug 2017 05:31:30 Zhttp://technet.microsoft.com/en-us/library/ms143799(v=sql.110).aspx#CommunityContent
Richard PierreRename the local SQL server name$0$0
$0Steps:----------------------* Cahnge 'YOUR_NEW_SQL_SERVER_NAME' in section (2)* Run (1), (2) and (3).* Restart SQL server* Run (1)You will notice that Serverproperty('Servername') only changes to the new value when the SQL server is restarted.NB. The script below assumes that the SQL server you are renaming is the first in server in the table master.sys.servers/*********************************************************************1) This section used to display Server Names AFTER makingThu, 13 Sep 2012 23:24:46 -0700http://technet.microsoft.com/en-us/library/ms143799(v=sql.110).aspx#CommunityContent
Najeebca VU3NGBRenameselect @@servername
$0$0
$0
$0sp_dropserver 'old_servername'$0
$0$0
$0
$0sp_addserver 'new_servername', local$0
$0$0
$0
$0Block each line and execute$0
$0$0
$0Tue, 11 Sep 2012 11:37:58 -0700