Regarding Lock

  • is there any way to view what kind lock happening to table when query get executing ?

  • There's a few ways but if you want to capture the lock escalation etc on a particular table then you could use sql profiler.

    I would not use ths to capture system wide lock info as you'll potentially put a lot of extra load on your sql server

    hth

    David

  • You can look in the dmv sys.dm_tran_locks

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • EXEC sp_Lock

    If you know the spid of your process, you can also pass that in as a parameter.

    There is information about the procedure in Books Online.

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

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