question

Sagar Bhargava avatar image
Sagar Bhargava asked

Renaming a server with a default SQL Server instance installed

One of the server in my company is going to be renamed. This server has a default SQL Server instance installed on it. After the server is renames and made available, apart from the below steps, what else do I need to check to make sure this is all good? BTW, it only has one database on it apart from the system database. --Change the server name and reboot SQL Server --Connect to the new server name in Query Analyzer and run the following command: sp_dropserver 'old server name' sp_addserver 'new server name', 'local' --Delete the entry in Enterprise Manager for the old server name. Stop and start the SQL Server service to complete the process. Another thing, in case this server had a lot of databases installed and was renamed, how do we get all DB's back. Will the databases still be attached to the old instance which is now not existing ?
sqlserver-instances
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Magnus Ahlkvist avatar image
Magnus Ahlkvist answered
Hi, The databases will remain attached to your instance. **sp_dropserver, sp_addserver, restart** should do the trick for you. And then you'll obviously need to change connection strings in your applications. BTW - you mention Enterprise Manager. Does that mean you're running SQL Server 2000? If so, the above will be enough. If you run SQL Server 7.0, I ***think*** you'll also have to run the setup program again.
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sagar Bhargava avatar image Sagar Bhargava commented ·
Sorry, this should have been Management Studio for SQL Server 2008. Are there any more steps then ?
0 Likes 0 ·
Magnus Ahlkvist avatar image Magnus Ahlkvist commented ·
Hi, No, that should be all.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.