Saturday, June 2, 2012

1 Server Name and Instance Name

To get the SQL Server Server name

Select * from sys.servers 

To get the instance name


For the default instance. the @@servicename always show as ‘MSSQLSERVER’

The SSMS –> Instance name –> Server Property –> General –> Name represents the name of the instance. (  ) , however for the default instance, it would show as HOSTNAME.


We can change the server name quite easily . In fact there are some application has dependence on the server name.

sp_dropserver 'Servername';
sp_addserver 'servername',local;

After the name has been changed, bounce the sql server instance. However there is no easy way to change the instance name.

In theory, you can update the register key and recreate the sql server service by using SC command. I have done so for the SSAS but not ever do it for SQL Server.


  1. At replica rolex uk, we believe in maintaining replica rolex sky dweller a long-term commitment to outstanding individuals, organizations, events and institutions in the fields of adventure, sports, art and culture, science and education.



SQL Panda Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates