The error below is generated on the Primary log shipping server when ever the log backup job is run.

LogShippingError

Full example of the error:

Date 11/04/2015 17:30:00
Log Job History (LSBackup_LogShipping)

Step ID 1
Server DEV-SQL01
Job Name LSBackup_LogShipping
Step Name Log shipping backup log job step.
Duration 00:00:15
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0

Message
2015-04-11 17:30:15.68 *** Error: Could not retrieve backup settings for primary ID ‘e62ed854-8517-4530-8a13-d35993c74c27’.(Microsoft.SqlServer.Management.LogShipping) ***
2015-04-11 17:30:15.68 *** Error: Failed to connect to server SQL01.(Microsoft.SqlServer.ConnectionInfo) ***
2015-04-11 17:30:15.68 *** Error: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server)(.Net SqlClient Data Provider) ***
2015-04-11 17:30:15.68 —– END OF TRANSACTION LOG BACKUP —–

Exit Status: 1 (Error)

The error is generated because the server name the SQL instance is ran on has changed. The instance is running on “DEV-SQL01″ but as you can see in the error “2015-04-11 17:30:15.68 *** Error: Failed to connect to server SQL01.(Microsoft.SqlServer.ConnectionInfo) ***” its trying to connect to “SQL01”

You can confirm this via:

SELECT @@SERVERNAME

To resolve the issue run the below code updating with the name

EXEC sp_dropserver 'SQL01'
GO

EXEC sp_addserver 'DEV-SQL01', 'local'
GO

You will then need to restart the Server! (not just the instance) to clear the issue.

 

Advertisements