Displaying Active Table Locks

Identify the user who has a table locked. An attempt to write to a table fails if another transaction holds a lock on that table.

  1. Run sp_iqtransaction.
  2. In the output, find the transaction identifier and the user name.
  3. Run the sp_iqlocks procedure.
    For each lock in the catalog store and the IQ store of your current database, sp_iqlocks tells you:
    • The connection and user ID that holds the lock

    • The table on which the lock is held

    • The type of lock, and a name to identify the lock

For example, when another transaction holds a lock, you see:

Cannot open the requested object for write in the current transaction (TxnID1). Another user has write access in transaction TxnID2.

Find TxnID2 in the output of sp_iqtransaction, and look for the name of the user in the same row of output.