During working with replication, encountered with one error to use actual server name for replication. For solution we need to change the SQL Server instance name as actual server name with following,
EXEC sp_dropserver 'Old Server Name' EXEC sp_addserver 'New Server Name','local' GO
Then restart the SQL service and confirm the new server name with @@SERVERNAME.
I would change the first statement to:
sp_dropserver 'old_name', droplogins GO
Yes Nakul,
Login account should be dropped also. Thanks.
When I tried:
EXEC sp_dropserver 'Old Server Name'
Received the following error:
The server 'Old Server Name' does not exist.
if your renaming the default sql server instance you must also rename the machine (computer name) otherwise sql server will fail to connect to the new instance name