Some linked server connections stop working

  • I have a 2008R2 Standard instance (2008R2 SP1 10.50.2500) which has developed strange problems with linked server connections.

    All of these linked server connections were working normally at one point, and some of them still are, but others will hang on any direct attempt to use them (using SSMS, openquery, sp_testlinkedserver, etc.) If using code, they run for a 15-30 (or longer) minutes before returning a timeout error. In SSMS, using "test connection" results in the entire SSMS instance locking for the same 15-30 minutes finally resulting in the timeout error.

    Other servers in the group with the exact same driver and connection information still connect without issue.

    Most of these connections are Oracle, but I have a DB2 connection and an ODBC connection to MySQL that is doing it too. Not all the connections are dead, several of them are working properly.

    When the server has been rebooted, the linked server connections function properly, but within 10-30 minutes, they cease to allow any connection.

    I've searched everywhere and found no one with these exact problem.

    Any ideas?

  • Funny timing. We've seen something similar recently but on a 2008 instance (not R2). I'll be interested to hear if anyone has anything on this.

  • i believe that can happen if a transaction between the server and a linked server gets rolled back, but never completes the rollback.

    if you check sp_who2 for spid = -2, which is indicative of the issue, i think that's the problem;

    only way to fix it is to bounce the server, which rollsback the transaction without waiting for the Distributed Transaction Coordinator to report successfully rolled back @ the linked server.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • I have checked sp_who2 and don't have any hung spids.

    Good thought, though. I hadn't considered that one. Just not the problem here.

    Any other ideas?

  • Just a follow up.

    I still don't know what caused some of my linked servers to lock and not others, but I am back up and running.

    The only suggestion I had gotten from anyone that I had not tried was to reboot the server, immediately start a trace and determine at what point the linked servers stopped responding.

    I did this, but while previous server reboots had resulted in temporary restoration of linked server activity followed by them failing to respond within half an hour of reboot, this time that didn't happen.

    All the linked server connections came back online after the reboot, and even though I had my trace running for hours hoping to catch the suspect query that killed them, nothing did.

    So, five days on, we are working, and hopefully will continue.

  • I have run into the same issue. Were you able to find any solution to it?

  • adpr0401 i've seen the same issue multiple times since the last time i replied to this thread five eyar sago.
    The cause has typically been someone being impatient, and canceling a query that featured a linked server(and a distributed transaction(inssert/update/delete locally from a remote server)

    I've tried a few different things, stopping and starting the Distributed Transaction Coordinator service on one or both machines, and actually stopping and starting the SQL Service, both typically work.

    i've tried dropping and recreating the linked server, but that typically did not fix the issue.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • We have been facing this issue ON and OFF for a while. But this has started to pop up more often. When problem arises, re-starting the destination server seems to help for about half an hour or so, but the issue comes back again. Re-starting SQL Server rarely helps me for this on-going issue.  Thank you Lowell for your input.

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply