Tuesday, November 23, 2004

Changing the server name after installing SQL server.

There are many a times when we might have to change our system name after installing SQL server and SQL might throw an error during some operations,
You need to change the srvname fields in the sysservers table in the master DB, but this cannot be done directly form the table view, as ad-hoc updates to this table is not allowed, below is an sp using which we can achieve the task.

****For Default Instance****
sp_dropserver
go
sp_addserver , local
go

****Foa a named instance****
sp_dropserver
go
sp_addserver , local
go

For more info and FAQs check this link.
http://support.microsoft.com/kb/257716/en-us"