Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Some linked server connections stop working Expand / Collapse
Author
Message
Posted Wednesday, September 5, 2012 1:17 PM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Monday, October 27, 2014 3:17 PM
Points: 97, Visits: 363
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?
Post #1354838
Posted Wednesday, September 5, 2012 1:32 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Monday, October 27, 2014 3:30 PM
Points: 356, Visits: 919
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.
Post #1354851
Posted Wednesday, September 5, 2012 1:58 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 3:24 PM
Points: 12,905, Visits: 32,180
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

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1354872
Posted Thursday, September 6, 2012 6:02 AM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Monday, October 27, 2014 3:17 PM
Points: 97, Visits: 363
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?
Post #1355247
Posted Thursday, September 13, 2012 6:17 AM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Monday, October 27, 2014 3:17 PM
Points: 97, Visits: 363
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.
Post #1358502
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse