Skip to main content
3 of 3
broken link fixed, cf. https://meta.stackoverflow.com/a/406565/4751173
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: Link

Sleeping SPID blocking other transactions

TheGameiswar
  • 3k
  • 4
  • 29
  • 50