How to correctly rename a default instance of SQL Server 2005

After we did a migration from an earlier version of SQL to a new server we needed to rename the Windows server to match the old one.

It does actually seem to rename the SQL instance when you open SQL SSME but there is an extra step to complete fully:

Run the following in Query Analyser:


Which will return the old name of your SQL Server

Then using the quotes if needed (esp if your server name includes a hyphen) :

sp_dropserver ‘old server name’
sp_addserver ‘new server name’, ‘local’

Run SELECT @@SERVERNAME again should return the name of the correct server


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s