How to change to the current server name in the 6.x master database (ISQL/w)
To change to the current server name in the 6.x master database
- Start Microsoft® SQL Server™ in minimal configuration mode. In a command prompt window, from the \Mssql\Binn directory, run:
sqlservr -f
- On the Start menu, point to Programs /Microsoft SQL Server 6.x, and then click ISQL/w.
- Enter the sa password; then click Connect.
- Execute SELECT @@SERVERNAME to retrieve the former server name.
- Execute sp_dropserver to drop the former server.
- Execute sp_addserver to add the current server.
- Stop SQL Server. In the command prompt window, press Ctrl+C.
- Restart SQL Server.
- Execute SELECT @@SERVERNAME to verify the current server name.
Examples
--Start SQL Server in minimal configuration mode.
--Retrieve the former server name.
SELECT @@SERVERNAME
--Drop the server returned from the previous select.
sp_dropserver 'SERVER6X'
--Add the current server.
sp_addserver 'SERVER70', local
--Stop SQL Server.
--Restart SQL Server in minimal configuration mode.
--Verify the current server name.
SELECT @@SERVERNAME
(c) 1988-98 Microsoft Corporation. All Rights Reserved.