Working with VMs a server can be cloned with SQL Server installed. The server is renamed but SQL server maintains its original name.
Run this script in SSMS:
sp_dropserver 'old server name'
sp_addserver 'new server name', 'local'
Restart the SQL Server service then test the rename worked:
Select @@servername;
Make sure the SQL Agent is running – it will stop when the sql service stops. If you restart sql server service through the SQL configuration control panel it should restart the sql agent for you.
No comments:
Post a Comment