Skip to main content
broken link fixed, cf. https://meta.stackoverflow.com/a/406565/4751173
Source Link
Glorfindel
  • 2.2k
  • 5
  • 18
  • 26

some reasons can be app waiting for user inputs,time outs with out proper exceptional handling.

you can easily simulate this by

Begin tran Update authors …. Waitfor delay ’10:00:00’ --- time out will occur here (simulates long workload) rollback

For second question on Slocks,These mean shared locks which are taken by database engine for any select statements.

Good place to know more on locking would be https://technet.microsoft.com/en-us/library/aa213039(v=sql.80).aspx

References: http://blogs.msdn.com/b/psssql/archive/2008/04/21/how-it-works-what-is-a-sleeping-awaiting-command-session.aspxLink

Sleeping SPID blocking other transactions

some reasons can be app waiting for user inputs,time outs with out proper exceptional handling.

you can easily simulate this by

Begin tran Update authors …. Waitfor delay ’10:00:00’ --- time out will occur here (simulates long workload) rollback

For second question on Slocks,These mean shared locks which are taken by database engine for any select statements.

Good place to know more on locking would be https://technet.microsoft.com/en-us/library/aa213039(v=sql.80).aspx

References: http://blogs.msdn.com/b/psssql/archive/2008/04/21/how-it-works-what-is-a-sleeping-awaiting-command-session.aspx

Sleeping SPID blocking other transactions

some reasons can be app waiting for user inputs,time outs with out proper exceptional handling.

you can easily simulate this by

Begin tran Update authors …. Waitfor delay ’10:00:00’ --- time out will occur here (simulates long workload) rollback

For second question on Slocks,These mean shared locks which are taken by database engine for any select statements.

Good place to know more on locking would be https://technet.microsoft.com/en-us/library/aa213039(v=sql.80).aspx

References: Link

Sleeping SPID blocking other transactions

replaced http://dba.stackexchange.com/ with https://dba.stackexchange.com/
Source Link

some reasons can be app waiting for user inputs,time outs with out proper exceptional handling.

you can easily simulate this by

Begin tran Update authors …. Waitfor delay ’10:00:00’ --- time out will occur here (simulates long workload) rollback

For second question on Slocks,These mean shared locks which are taken by database engine for any select statements.

Good place to know more on locking would be https://technet.microsoft.com/en-us/library/aa213039(v=sql.80).aspx

References: http://blogs.msdn.com/b/psssql/archive/2008/04/21/how-it-works-what-is-a-sleeping-awaiting-command-session.aspx

Sleeping SPID blocking other transactionsSleeping SPID blocking other transactions

some reasons can be app waiting for user inputs,time outs with out proper exceptional handling.

you can easily simulate this by

Begin tran Update authors …. Waitfor delay ’10:00:00’ --- time out will occur here (simulates long workload) rollback

For second question on Slocks,These mean shared locks which are taken by database engine for any select statements.

Good place to know more on locking would be https://technet.microsoft.com/en-us/library/aa213039(v=sql.80).aspx

References: http://blogs.msdn.com/b/psssql/archive/2008/04/21/how-it-works-what-is-a-sleeping-awaiting-command-session.aspx

Sleeping SPID blocking other transactions

some reasons can be app waiting for user inputs,time outs with out proper exceptional handling.

you can easily simulate this by

Begin tran Update authors …. Waitfor delay ’10:00:00’ --- time out will occur here (simulates long workload) rollback

For second question on Slocks,These mean shared locks which are taken by database engine for any select statements.

Good place to know more on locking would be https://technet.microsoft.com/en-us/library/aa213039(v=sql.80).aspx

References: http://blogs.msdn.com/b/psssql/archive/2008/04/21/how-it-works-what-is-a-sleeping-awaiting-command-session.aspx

Sleeping SPID blocking other transactions

Source Link
TheGameiswar
  • 3k
  • 4
  • 29
  • 50

some reasons can be app waiting for user inputs,time outs with out proper exceptional handling.

you can easily simulate this by

Begin tran Update authors …. Waitfor delay ’10:00:00’ --- time out will occur here (simulates long workload) rollback

For second question on Slocks,These mean shared locks which are taken by database engine for any select statements.

Good place to know more on locking would be https://technet.microsoft.com/en-us/library/aa213039(v=sql.80).aspx

References: http://blogs.msdn.com/b/psssql/archive/2008/04/21/how-it-works-what-is-a-sleeping-awaiting-command-session.aspx

Sleeping SPID blocking other transactions