Friday, April 13, 2012

Rename a Computer that Hosts a Stand-Alone Instance of SQL Server

Have you ever renamed a windows server after installing SQL server on it? Well, sql still holds the old name if you run select @@servername.
So, there are a few steps to follow after the rename. First, allow master (system database ) to see the new default instance name. Second, restart the database engine.

Open new query windows or sqlcmd:

use master
go

sp_dropserver
GO
sp_addserver , local
GO

No comments:

Post a Comment