سؤال

I am doing log shipping between two amazon ec2 instances running windows server 2008 R2.

The sql server version is Sql server 2008 R2 standard edition

Both the instances are in the same domain and i can access the shared folders between the intances.

The sql server service account, agent service account are all running under domain account.

When i activate log shipping (with stand by mode restore in secondary server), the inital backup gets restored on the secondary.

After that the backup operation is getting failed and i get the following error message.

* Error: Could not retrieve backup settings for primary ID 'xxxxxx-xxxx-xxxx-xxxx-4d772cd7337e'.(Microsoft.SqlServer.Management.LogShipping)


* Error: Failed to connect to server IP-0A7653F2.(Microsoft.SqlServer.ConnectionInfo) *

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) *----- END OF TRANSACTION LOG BACKUP -----**

هل كانت مفيدة؟

المحلول

I was able to fix this. The reason for the error is that the default server name (IP-0A7653F2) has been changed to the name of the server instance (which was changed while adding the instance to domain controller).While setting up log shipping, the settings use the default server name and not the updated server name. So, after setting up the log shipping, i edited the settings and changed the server name ** IP-0A7653F2 **to the current instance name and it worked.

نصائح أخرى

I also stumbled the same issue with the following error messages. I'm posting it here so it's easier for me to find the next time I have the same issue.

*** Error: Could not retrieve restore settings.(Microsoft.SqlServer.Management.LogShipping) ***
*** Error: Failed to connect to server WIN-XXXXXXXXXX.(Microsoft.SqlServer.ConnectionInfo) ***
2019-06-13 10:23:14.90  *** 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) ***

The solution was change the server name in the SQL Agent command:

  1. Find the LS* SQL Server Agent jobs. For each one,
  2. Edit the step
  3. Change the server name

Also, to make future setup work without fiddling with the steps, tell SQL Server about the new names:

sp_dropserver <old_name>;  
GO  
sp_addserver <new_name>, local;  
GO  
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top