Sunday, April 28, 2013

SQL Server Name Update

once in a while i encounter clients that only after the installation of the SQL rememeber that the server name is not what they wanted.....
 
normally we had to reinstall the whole server again. but luckly we can update the SQL Server name After the machine change (connection to TFS after rename is a different issue...)
 
run the following in SSMS:
  1. run "Select @@servername" to verifiy the current server name
  2. run the following script to update the server name 
  3.          sp_dropserver 'old_name'
             go
             sp_addserver 'new_name','local'
             go
  4. Restart SQL Server service. I prefer the command prompt for this, but you can just as easily do it in Services under the Control Panel
    • net stop mssqlserver
    • net start mssqlserver
  5. Then after that is done run "select @@servername" to check the new name
 
 
 
 
 
 
 

No comments:

Post a Comment