ShowLocks



Shows every lock held by every transaction, optionally for a single process.

ShowLocks(Numeric processId = null)

Permissions

Requires an account that is a member of an administrator role.


ProcessId, Granularity (the kind of object locked), Operation (Read, Write, Delete, Stability) and Object Name.

Parentheses

Parameters must be passed in parentheses: EXEC ShowLocks(1), not EXEC ShowLocks 1.


round-pushpin Shows all locks.
EXEC ShowLocks

round-pushpin Shows the locks held by process 1.
EXEC ShowLocks(1)