How to: Rename a SQL Server Failover Cluster Instance
When a SQL Server instance is part of a failover cluster, the process of renaming the virtual server differs from that of renaming a stand-alone instance. For more information, see How to: Rename a Computer that Hosts a Stand-Alone Instance of SQL Server.
The name of the virtual server is always the same as the name of the SQL Network Name (the SQL Virtual Server Network Name). Although you can change the name of the virtual server, you cannot change the instance name. For example, you can change a virtual server named VS1\instance1 to some other name, such as SQL35\instance1, but the instance portion of the name, instance1, will remain unchanged.
Before you begin the renaming process, review the items below.
SQL Server does not support renaming servers involved in replication, except in the case of using log shipping with replication. The secondary server in log shipping can be renamed if the primary server is permanently lost. For more information, see Replication and Log Shipping.
When renaming a virtual server that is configured to use database mirroring, you must turn off database mirroring before the renaming operation, and then re-establish database mirroring with the new virtual server name. Metadata for database mirroring will not be updated automatically to reflect the new virtual server name.
To rename a virtual server
Using Cluster Administrator, change the SQL Network Name to the new name.
Take the network name resource offline. This takes the SQL Server resource and other dependent resources offline as well.
Bring the SQL Server resource back online.
After a virtual server has been renamed, any connections that used the old name must now connect using the new name.
To verify that the renaming operation has completed, select information from either @@servername or sys.servers. The @@servername function will return the new virtual server name, and the sys.servers table will show the new virtual server name. To verify that the failover process is working correctly with the new name, the user should also try to fail the SQL Server resource over to the other nodes.
For connections from any node in the cluster, the new name can be used almost immediately. However, for connections using the new name from a client computer, the new name cannot be used to connect to the server until the new name is visible to that client computer. The length of time required for the new name to be propagated across a network can be a few seconds, or as long as 3 to 5 minutes, depending on the network configuration; additional time may be required before the old virtual server name is no longer visible on the network.
To minimize network propagation delay of a virtual server renaming operation, use the following steps:
To minimize network propagation delay
-
Issue the following commands from a command prompt on the server node:
ipconfig /flushdns ipconfig /registerdns nbtstat –RR
I have a SQL cluster with the name NY1\sales. This is a NAMED instance of SQL. I want to change it to NY1\acctg. I don't think I can do it. And the article does not address this. I have only found a couple of answers on forums that state the a named instance cannot be renamed. But I would like an official answer.
To do so see Configuration Manager in your start menu. The alias only works on the one machine, so you would need to make it on all cluster nodes if on a cluster.
It points 32-bit or 64-bit connections from SQL Native client providers from the oldname --> newname seemlessly.
http://msdn.microsoft.com/en-us/library/ms174212.aspx
For a company-wide multi-machine approach, (since aliases are confined to only one machine as a time), I see folks using CNames aliases in their DNS to redirect the old server name to the new server IP. That probably has some side effects too and can confuse folks immensely, so test cautiously.
This article does not mention SQL Server Analysis Services, Reporting Serivces, Integration Services, etc. I think this article is scoped only to the SQL Server Database Engine, but it does not say that explicitly.
- 3/18/2011
- Jason H - SQL
This article isnt mentioning that after virtual server name its also very likely that Maintenance Plans and Jobs stop working. Recreating them usually works but it seems there are still default references to the old virtual server name. For instance the old name shows up in Connection strings on Data Source of a Job steps running SSIS package even if General tab shows correct server and even if one changes it it reappears whenever Maintenance Plan is changed.
Someone should document how to fix such problems!
- 9/11/2010
- Sten Westerback