How to Rename SQL Instance Name
G Hemadribabu
Certified Cloud Database - Specialty || AWS Cloud Architect Associate || Performance Engineer Architecting Tomorrow's Solutions: Database Administrator Manager & Digital Strategy Advocate
Scenario
Troubleshooting host name changes. When the machine name is changed where we have installed SQL Server, all the instances services are started but?replication, Jobs, Alerts,?Maintenance plans?causes errors. Hence we have to rename the instance.
Solution
To rename instance we can use the following SP
1. Check the old server name as follows
SELECT@@servername
2. Drop the server and add the new server name
SP_DROPSERVER <oldName>
SP_ADDSERVER <newName>, local
3. Restart the instance
4. Check the server name again
SELECT @@servername
There are a few potential impacts to consider when changing the name of a SQL Server instance:
It is a good idea to carefully plan and test the impact of changing the instance name before making the change in a production environment.
AccuTrack Lead Developer at Engineerica Inc.
6 个月You are not changing instance name, you are changing host (server) name only. There is a big difference.