13. Understanding the Locking System : Tools for Monitoring Locking : SET LOCK_TRACE Statement
 
Share this page                  
SET LOCK_TRACE Statement
The SET LOCK_TRACE statement lets you start and stop lock tracing at any time during a session. This statement has the following syntax:
set [no]lock_trace
Important!  Because the LOCK_TRACE output may change, use SET LOCK_TRACE as a debugging or tracing tool only.
To use SET LOCK_TRACE you can:
Issue the SET LOCK_TRACE statement from a terminal monitor session.
To start tracing locks:
set lock_trace;
To stop tracing locks:
set nolock_trace;
Include the SET LOCK_TRACE statement in an embedded language program.
Specify SET LOCK_TRACE with an environment variable or logical.
For example, to start lock tracing with ING_SET issue the following statement at the operating system prompt:
Windows:
set ING_SET=set lock_trace
UNIX:
C shell:
setenv ING_SET "set lock_trace"
Bourne shell:
ING_SET="set lock_trace"
export ING_SET
VMS:
define ing_set "set lock_trace"
When you use SET LOCK_TRACE during a session, information is displayed about locks used and released in your session.
If you use an environment variable/logical to set the LOCK_TRACE flag, you receive output for utility startup queries as well as for query language statements.