Actions
View the currently executing SQL statement¶
The db2pd utility can be used to troubleshoot the db2 active instance.
Steps:- login as the owner of the db2 instance, e.g. db2inst1
- First, identify the list of applications:
db2pd -db <<database alias name>> -applications
- Based on the application command's output, filter out those applications with the Status, UOW-WAITING and UOW-EXECUTING
- Based on the filter-ed data, you can then identify the statement using the combination L-AchID and L-StmtUID columns.
- After obtained the value from L-AchID and L-StmtUID, execute the following command:
- Usage:
db2pd -db store -applications -dyn | egrep '(<<L-AchID|>>|<<L-StmtUID>>)'
- Example:
db2pd -db store -applications -dyn | egrep '(123|4563)'
- Example (SQL may span multiple lines. Include the
-A
parameter to specify the number of lines to grep after):db2pd -db store -applications -dyn | egrep -A 15 '(123|4563)'
- Usage:
Updated by chin-yeh about 13 years ago · 4 revisions