How to modify the server name in SQL Server

How to modify the server name in SQL Server

Procedure Steps

NOTE: Please be sure to back up the Master and AccessControl databases before proceeding.

To update the name do the following:

1) Open the Microsoft SQL Server Management Tool.

2) Open a SQL query on the Master database.

3) Type in the following query and execute it to display the server name currently loaded in SQL. Since the name change will not flow to SQL it will have to be removed.
select @@servername

4) Type in the following query and execute it to remove the old server.
sp_dropserver 'OLDSERVERNAME'

5) Type in the following query and execute it to add the new server. Make sure 'NEWSERVERNAME'is the new name of the server.
sp_addserver 'NEWSERVERNAME', 'local'

6) Restart the SQL services.

7) Close and then reopen the Microsoft SQL Server Management Tool.

8) Remove the old server registration.

9) Register the new server.

Applies To

SQL Server (All versions)

Additional Information

None