MSSQL - Fixing Transaction Log backups failing with error "@@SERVERNAME does not match SERVERPROPERTY('ServerName')"

To Fix Transaction Log backups failing with error "@@SERVERNAME does not match SERVERPROPERTY('ServerName')" you can simply run the following to verify that the machine name and server name property are the same:


SELECT SERVERPROPERTY('MachineName')
SELECT @@SERVERNAME


If not, you must fix it manually and RESTART SQL - replace oldname and newname with the new name of the SQL server.

sp_dropserver 'OLDNAME;
GO
sp_addserver 'NEWNAME', local;
GO

Comments

Popular posts from this blog

Azure - Check Invitation Status to guest user

Advice for breaking into the DevOps field

Blogs for Azure Information