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?

asked Sep 21, 2016 at 10:50

1 Answer 1

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.

answered Sep 21, 2016 at 10:59
2
  • Thank you for your reply, it seems indeed that th name resolution the problem. It's also a problem when executing the stored procedure Commented Sep 21, 2016 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 Commented Sep 21, 2016 at 15:47

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.