Rename a Computer that Hosts a Stand-Alone Instance of SQL Server 2005
Summary about renaming a computer that hosts a stand-Alone instance of sql server 2005:
When you change the name of the computer that is running Microsoft SQL Server 2005, the new name is recognized during SQL Server startup. You do not have to run Setup again to reset the computer name. The following steps cannot be used to rename an instance of SQL Server 2005. These steps can be used only to rename the part of the instance name that corresponds to the computer name. For example, you can change a computer named MB1 that hosts an instance of SQL Server named Instance1 to another name, such as MB2. However, the instance portion of the name, Instance1, will remain unchanged. In this example, the \\ComputerName\InstanceName would be changed from \\MB1\Instance1 to \\MB2\Instance1.
You can connect to SQL Server using the new computer name after you have restarted SQL Server. However, to ensure that @@servername returns the updated name of the local server instance, you should manually run one of the following procedures, depending on whether you are updating a default or named instance
For a renamed default instance, run the following procedures:
sp_dropserver
GO
sp_addserver
GO
Restart the SQL Server instance.
For a renamed named instance, run the following procedures:
sp_dropserver 'old_name\instancename' GO sp_addserver 'new_name\instancename', local GO
Restart the SQL Server instance.
To verify that the renaming operation has completed successfully:
Select information from either @@servername or sys.servers. The @@servername function will return the new name, and the sys.servers table will show the new name.
select @@servername
If the computer has any remote logins, running sp_dropserver may generate an error similar to this:
Server: Msg 15190, Level 16, State 1, Procedure sp_dropserver, Line 44There are still remote logins for the server 'SERVER1'.
To drop remote logins for a default instance, run the following procedure:
sp_dropremotelogin old_name
GO
To drop remote logins for a named instance, run the following procedure:
sp_dropremotelogin old_name\instancename
GO
Renaming a cluster (virtual server) is really quite easy, just do the following:
- Start Cluster Administrator, right-click the Network Name resource, and then click Take Offline.Note Access to the VirtualServer by clients cannot now occur because the Network Name resource is offline.
- Double-click the Network Name resource where you want to enable the DNS Registration Must Succeed option, and then click the Parameters tab.
- Click the DNS Registration Must Succeed option, click OK, right-click the Network Name resource, and then click Bring Online. When the Network Name resource comes online, it will verify that it can register the VirtualServer with the DNS server.
However renaming a SQL Server 20000 Virtual Server is not supported by Microsoft
Rename a SQL Server 2005 Virtual Server seems to be a little bit easier
Regards
Stefan
0 kommentarer:
Skicka en kommentar