SQL Clone
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-Addicted
SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)

Group: General Forum Members
Points: 476 Visits: 421
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
Hall of Fame
Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)Hall of Fame (3.4K reputation)

Group: General Forum Members
Points: 3370 Visits: 1020
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
SSC Guru
SSC Guru (184K reputation)SSC Guru (184K reputation)SSC Guru (184K reputation)SSC Guru (184K reputation)SSC Guru (184K reputation)SSC Guru (184K reputation)SSC Guru (184K reputation)SSC Guru (184K reputation)

Group: General Forum Members
Points: 184877 Visits: 41569
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-Addicted
SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)

Group: General Forum Members
Points: 476 Visits: 421
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-Addicted
SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)

Group: General Forum Members
Points: 476 Visits: 421
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.
adpr0401
adpr0401
SSC Rookie
SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)

Group: General Forum Members
Points: 27 Visits: 140
I have run into the same issue. Were you able to find any solution to it?
Lowell
Lowell
SSC Guru
SSC Guru (184K reputation)SSC Guru (184K reputation)SSC Guru (184K reputation)SSC Guru (184K reputation)SSC Guru (184K reputation)SSC Guru (184K reputation)SSC Guru (184K reputation)SSC Guru (184K reputation)

Group: General Forum Members
Points: 184877 Visits: 41569
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!
adpr0401
adpr0401
SSC Rookie
SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)

Group: General Forum Members
Points: 27 Visits: 140
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.
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