Skip to main content

Monitoring Locks

Monitoring Locks

InterSystems IRIS locks are created when an InterSystems IRIS process issues a LOCK command on an ObjectScript local variable or global variable, as long as the entity is not already locked by another process. Entities need not exist in the database to lock them. See Locking and Concurrency Control.

To display locks system-wide, navigate to the View Locks page (System Operation > Locks > View Locks). To delete selected locks system-wide, navigate to the Manage Locks page (System Operation > Locks > Manage Locks). In both cases, the displayed lock table lists one row for each held lock and for each waiting lock request, identifying the owner. A single row may identify multiple locks held by an owner on the same entity. For example, holding an incremented lock or holding both a Shared lock and an Exclusive lock. If more than one process holds a lock on the same entity, each owner has its own row.

Optionally select either or both of the following check boxes at the top of this page, to include additional information if needed. This information is not included by default, for performance reasons:

  • Owner’s routine information. This option adds the Routine column to the display.

  • SQL table name. This option adds the SQL table name column to the display.

The Lock Table has the following column entries.

Column Heading Definition
Owner The process ID of the process holding or waiting for the lock. Contains the client system name if it is a remote lock.
OS User Name Username assigned to the process holding or waiting for this lock.
Mode count Lock mode and lock increment count. If the lock count is 1 the count is not displayed. For a list of ModeCount values, refer to Lock Management.
Reference Lock reference string of the lock item (does not include the database name).
SQL table name The name of the SQL table, if any, associated with the lock reference. To see this column, you must select the SQL table name check box.
Directory The database location of the lock item.
System The system name of where the lock is located. If it is the local system the column is blank.
Routine The routine line currently being executed by the process holding or waiting for the lock. To see this column, you must select the Owner’s routine information check box.
Remove Manage Locks only: If this lock is removable, this option along with the Remove all locks for process option (for local locks) or the Remove all locks from remote client option (for remote locks) appears in the row. Click the appropriate option to remove the lock. remove all locks for the process, or remove all locks from the remote client. If a lock you are removing is part of an open transaction, you are warned before confirming the removal.

In most cases, the only time you need to remove locks is as a result of an application problem.

For a more in-depth description of the LOCK command and its features, see LOCK.

You may need to enlarge the size of the lock table if your system uses a large number of locks. You can do this using the Management Portal; for instructions, see locksiz.

For more detailed information and alternative ways to manage locks, see Lock Management.

FeedbackOpens in a new tab