For a renamed computer that hosts a default instance of SQL Server, run the following procedures:
EXEC sp_dropserver '<old_name>';
GO
EXEC sp_addserver '<new_name>', local;
GO
Restart the instance of SQL Server.
For a renamed computer that hosts a named instance of SQL Server, run the following procedures:
EXEC sp_dropserver '<old_name\instancename>';
GO
EXEC sp_addserver '<new_name\instancename>', local;
GO
Restart the instance of SQL Server.
After the Renaming - Verify renaming operation
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. The following example shows the use of @@SERVERNAME.
SELECT @@SERVERNAME AS 'Server Name';
Hiç yorum yok:
Yorum Gönder