2

I'm trying to change a stored procedure that is used to updates data in a local and a linked server. "UPDATE [PcName].[DatabaseName].[dbo].[TableName]"

As both servers are available the stored procedure can be executed (updated) without an problem. If the linkedserver is down, I'm getting this error message:

OLE DB provider "SQLNCLI11" for linked server " linkedserver " returned message "Login timeout expired".
OLE DB provider "SQLNCLI11" for linked server "linkedserver " returned message "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.".
Msg 53, Level 16, State 1, Line 0
Named Pipes Provider: Could not open a connection to SQL Server [53]. 

How can I still change a stored procedure while the linkedserver is down?

1

You 'could' temporarily change the linked server 'connection' to point to a Sql instance that is available, but be aware that linked servers do not 'honor' Deferred Name Resolution and any object referenced by the linked server will need to exist on the temporary connection. Here is someone with a 'similar' problem and some suggestions.

  • Thank you for your reply, it seems indeed that th name resolution the problem. It's also a problem when executing the stored procedure – E Grosm Sep 21 '16 at 15:40
  • ... the stored procedure and one of the servers is down. Even if I put the external transaction in a IF statement and with it's own try catch, the complete stored procedure will fail. If found the following link very useful: sommarskog.se/error_handling/Appendix1.html#typicallinkederror – E Grosm Sep 21 '16 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.