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

Are sleeping transactions are really sleeping Expand / Collapse
Author
Message
Posted Wednesday, July 8, 2009 7:52 AM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Friday, June 3, 2011 4:58 PM
Points: 88, Visits: 191
My server has gone down and is very slow at this moment. One log file has increased more than 76GB and I have found following error when I try to shrink this file. This is because of some offending process that is also using the resources which I need to shrink the file.

"Lock request timeout period exceeded."

I have also run sp_who2. I have found that many of the transactions are sleeping. What does sleeping means? If transaction is in sleeping should I kill this. Long back I remember that I killed one spid where the status was sleeping and this started getting rolled back for 5 hours and then I have to restart the m\c. Any heads up!!


-MJ
Please do not print mails and docx unless it is absolutely necessary. Spread environmental awareness.
Post #749262
Posted Wednesday, July 8, 2009 8:17 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, February 13, 2013 11:27 PM
Points: 170, Visits: 553
Don't kill any dormant processes (only as a last resort). There is a reason SQL doesn't clean them up itself...

It looks to me that one your queries could be missing a COMMIT statement...this often causes a large transaction log (if the cause isn't otherwise obvious).
Post #749278
Posted Wednesday, July 8, 2009 10:37 AM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Friday, June 3, 2011 4:58 PM
Points: 88, Visits: 191
So the status is sleeping when the process is waiting for resources for long... Is there any time period which switch this from running to sleeping status, David.

-MJ
Please do not print mails and docx unless it is absolutely necessary. Spread environmental awareness.
Post #749483
Posted Thursday, July 9, 2009 3:18 PM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, May 22, 2014 7:04 AM
Points: 1,688, Visits: 8,766
Try by running dbcc opentran() under that database and see the oldest transaction. Check what spid it has and whts it doing in background(might be a old left out connection due to open mgmt. studio). See if you can kill it as it might be holding your log.


MJ
Post #750679
Posted Friday, July 10, 2009 7:03 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, August 4, 2014 3:33 PM
Points: 3, Visits: 87
if you have a small group with query analyzer access, have them shut down their analyzer windows one at a time and you'll likely see one say something about 'uncommitted transactions' on the way out. that'll force it to commit. had to do that yesterday with a db saying its in transition. couldnt run sp_who or anything. went down there and had both contractors shut down all their windows and exit management studio, problem solved.

if that doesnt work, dbcc opentran, and you can see what it's doing with sp_lock(spid). it'll probably sit there looking the same forever. kill (spid) will kill it.

still no guarantee that it's not gonna rollback for awhile if you dont know what it was doing.

Post #751019
Posted Friday, July 10, 2009 7:36 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, September 11, 2014 12:39 PM
Points: 310, Visits: 659
Hello marty streetman,

I don't think that your statement is correct in your first paragraph. This can never happen that sql query analyzer or management studio is causing open transaction issues...

-LK
Post #751037
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse