to know the lock time

  • Please somebody suggest , query to know how long does lock exist on the data i.e start and end time of the lock

  • try querying sys.sysprocesses

    Jayanth Kurup[/url]

  • End time you're only going to get by inference. If you check for the lock regularly and it's gone, that's when it ended.

    Start time on a lock is pretty easy and there are lots of places to get it. You can query sys.dm_tran_locks to see all the information you'd need about the lock itself. You'd have to join that DMO to others to get more details about what query is running, etc.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

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

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