How to check locks on the database?

  • My web sides are going down, I want to check if there is any locks on my database, what is the command or procedure for that. Thank you

  • If you are having timeout because of blocking you can use the sp_blocker_pss80 (http://support.microsoft.com/kb/271509) here to try to find out what is causing the issue.

    Be warned this produces a lot output ... Thanks.

    Mohit.

    [font="Arial"]---

    Mohit K. Gupta, MCITP: Database Administrator (2005), My Blog, Twitter: @SQLCAN[/url].
    Microsoft FTE - SQL Server PFE

    * Some time its the search that counts, not the finding...
    * I didn't think so, but if I was wrong, I was wrong. I'd rather do something, and make a mistake than be frightened and be doing nothing. :smooooth:[/font]

    How to ask for help .. Read Best Practices here[/url].

  • I'd suggest sp_lock to get a list of locks. You might also want to read up about locking types.

    For blocking processes, sp_who & sp_who2 will give you a good idea of what is happening on your server. To look at processes in further detail, try

    dbcc_inputbuffer(spid)

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply