View Statements that lock tables or rows

  • Hi all

    I need to find a quick way of seeing what SPROCS on my reporting repository database (SQL 2005) are creating locks on tables.

    I have run sys.dm_tran_locks I can identify the table which has a lock on it but not the statement that caused it.

    I don't want any locks in my database as it is read only and only used for reporting purposes.

    Thanks in advance.

    Rob Glover.

  • run profiler using the locks counters. There is a default TSQL_Locks template...try that. You should get your sql in question.

    --------------------------------------------------------------------------
    When you realize you've dug yourself into a hole....Step 1...stop digging.

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

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