Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2001
    Location
    South Africa
    Posts
    33

    Angry Unanswered: row loevel locking ??

    I have a table that has 500K plus rows and 6 columns - it holds product items - and we have an application that access this table for product information. Sometime I see a RowLock on the table when doing a sp_lock - it stays there for sometimes upward of a minute ...

    Is this a deadlock ?? If so - why does it not output into the errorlog ???

    Thanks

  2. #2
    Join Date
    Sep 2002
    Location
    Hong Kong
    Posts
    159

    Re: row loevel locking ??

    Originally posted by tag
    I have a table that has 500K plus rows and 6 columns - it holds product items - and we have an application that access this table for product information. Sometime I see a RowLock on the table when doing a sp_lock - it stays there for sometimes upward of a minute ...

    Is this a deadlock ?? If so - why does it not output into the errorlog ???

    Thanks
    Not necessarilly, it could be a transaction that takes a long time to complete. A good example is returning a message to the user while the transaction is open...

    begin tran

    update insert or delete something

    if @@error != 0
    begin
    raiserror 20001 'Something bad happend'
    -- the above line gets picked up by the client app and waits for the
    -- user to press OK

    rollback transaction
    end

    commit transaction

    Does the row/page number change during the course of the time you're looking at it? If so the table is being read/written to (depends on lock type). If not something is keeping a lock on it while something else is happening.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •