Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Some linked server connections stop working


Some linked server connections stop working

Author
Message
DavidKBennett
DavidKBennett
SSC-Enthusiastic
SSC-Enthusiastic (108 reputation)SSC-Enthusiastic (108 reputation)SSC-Enthusiastic (108 reputation)SSC-Enthusiastic (108 reputation)SSC-Enthusiastic (108 reputation)SSC-Enthusiastic (108 reputation)SSC-Enthusiastic (108 reputation)SSC-Enthusiastic (108 reputation)

Group: General Forum Members
Points: 108 Visits: 412
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?
Scott D. Jacobson
Scott D. Jacobson
Old Hand
Old Hand (390 reputation)Old Hand (390 reputation)Old Hand (390 reputation)Old Hand (390 reputation)Old Hand (390 reputation)Old Hand (390 reputation)Old Hand (390 reputation)Old Hand (390 reputation)

Group: General Forum Members
Points: 390 Visits: 999
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.
Lowell
Lowell
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14956 Visits: 38953
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!

DavidKBennett
DavidKBennett
SSC-Enthusiastic
SSC-Enthusiastic (108 reputation)SSC-Enthusiastic (108 reputation)SSC-Enthusiastic (108 reputation)SSC-Enthusiastic (108 reputation)SSC-Enthusiastic (108 reputation)SSC-Enthusiastic (108 reputation)SSC-Enthusiastic (108 reputation)SSC-Enthusiastic (108 reputation)

Group: General Forum Members
Points: 108 Visits: 412
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?
DavidKBennett
DavidKBennett
SSC-Enthusiastic
SSC-Enthusiastic (108 reputation)SSC-Enthusiastic (108 reputation)SSC-Enthusiastic (108 reputation)SSC-Enthusiastic (108 reputation)SSC-Enthusiastic (108 reputation)SSC-Enthusiastic (108 reputation)SSC-Enthusiastic (108 reputation)SSC-Enthusiastic (108 reputation)

Group: General Forum Members
Points: 108 Visits: 412
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search