Linking Deadlocks to SQL with Insight

Document ID : KB000016011
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

linking Deadlocks to the problematic SQL causing the Deadlock. 

Question:

A user would like to know if she can link deadlocks to the problematic SQL using 

CA SYSVIEW for DB2?

Environment:
z/os DB2
Answer:

In the LOCKCONT screen you can put a "T" against an entry to see the SQL statement(if it is available). 

 

The HELP for the LOCKCONT screen gives more info. 

Here it is. 

 

**************** 

Starting with DB210,you may use the T line command to retrieve SQL information based on the statement ID in the trace record. 

If the SQL is dynamic SQL, using the T line command will cause CA SYSVIEW for DB2 to display the performance information, 

including the dynamic SQL statement text(DYNSQLTX IQL request),for the 

selected statement if it is available in the cache. 

 

If the SQL is static SQL, the T line command will cause CA SYSVIEW for DB2 to retrieve and display the SQL statement text 

from the DB2 catalog.