Monday, March 26, 2012

Help with sp_lock output

I am trying to figure out something in the dump of my sp_lock output
(sql server 2000)
spid Db Objectid IndId Type
Resource Mode Status
373 QADB 0 0 PAG
1:204097 S WAIT
What does an object id = 0 mean? i thought this always show the id of
an actual tableHi Derek,
The output you provided means that a shared lock is held on a page, not on a
table, hence the 0 value for objectid. Resource column states that the lock
is held on file id 1 page number 204097.
To easily work with locks and/or deadlocks, I suggest you try out the tool
called SQL Deadlock Detector. It monitors your database for locks and
deadlocks and
provides complete information on captured events. It tells you everything
you need to know (locked objects, blocked statements, blocking statements,
etc.) to solve your blocking/deadlock problems. The great thing about this
tool is it's event diagram which makes it exremely easy to see what exactly
is going on.
You can download it from here:
http://lakesidesql.com/downloads/DLD2/2_0_2007_809/DeadlockDetector2_Setup_08-09-2007.zip.
I've been using it for quite a while now (I purchased it) and find it very
handy and useful.
HTH.
"Derek" <gepetto_2000@.yahoo.com> wrote in message
news:1187376178.875402.209170@.d55g2000hsg.googlegroups.com...
>I am trying to figure out something in the dump of my sp_lock output
> (sql server 2000)
> spid Db Objectid IndId Type
> Resource Mode Status
> 373 QADB 0 0 PAG
> 1:204097 S WAIT
> What does an object id = 0 mean? i thought this always show the id of
> an actual table
>

No comments:

Post a Comment