0% found this document useful (0 votes)
19 views2 pages

Changing The Name of Your SQL Server

Changing the name of a SQL Server requires updating the server name in both Windows and SQL Server. The steps are to first verify the current server name in SQL Server, then use stored procedures sp_dropserver and sp_addserver to remove and add the server with the new name, and finally restart SQL Server and SQL Server Agent to complete the name change.

Uploaded by

Andrea Ci
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views2 pages

Changing The Name of Your SQL Server

Changing the name of a SQL Server requires updating the server name in both Windows and SQL Server. The steps are to first verify the current server name in SQL Server, then use stored procedures sp_dropserver and sp_addserver to remove and add the server with the new name, and finally restart SQL Server and SQL Server Agent to complete the name change.

Uploaded by

Andrea Ci
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Changing the name of your SQL Server

Have you ever had to change the name of a server that has SQL Server installed on it? If you
anwered yes, did you know that you also have to change the name in SQL Server? Here are the
steps to perform the change.

1. Open SQL Server Management Studio and


click New Query.

2. Type Select @@ServerName to verify that


the server name is correct or incorrect. In this
example, I changed the Windows 2003 from
WIN2K3R2EE to SQL Server. I did not change the
name in SQL Server 2005. It will still return the
old name. Let’s fix it.

3. Next, type sp_dropserver ‘WIN2K3R2EE’

4. You are now ready to add the correct name by


typing sp_addserver ‘SQLSERVER’. local
5. Restart sql server and the sql server agent by opening a command prompt and typing net stop
mssqlserver and net start msssqlserver. To stop and start the sql server agent, type net stop or
start sqlserveragent.

6. Click New Query in SQL Server Management


Studio and type select @@servername to verify
everything is correct and you have successfully
changed the sql server name.

You might also like