Professional Documents
Culture Documents
PHNM
May want to save deadlock info to a file for easier scrolling by adding > <file> 2. Find the SQL and Table Locks involved.
a. Step 1 will return something like the list below b. Scroll and Look for Timestamps that match -911 rc=2 time. c. Find SQL, Tables and Locks.
58) Deadlocked Connection ... Deadlock ID: 2 Deadlock Node: 0 Participant no.: 2 Participant no. holding the lock: 3 Appl Id: G991F348.F407.081211073246 Appl Seq number: 0024 Appl Id of connection holding the lock: *N0.db2adbem.081211074134 Seq. no. of connection holding the lock: 0048 Lock wait start time: 12/11/2008 07:44:42.840741 Lock Name : 0x01240004000000000000000054 Lock Attributes : 0x00000010 Release Flags : 0x00000001 Lock Count : 1 Hold Count : 1 Current Mode : IS - Intent Share Requesting lock as part of escalation: TRUE Deadlock detection time: 12/11/2008 07:44:57.687919 Table of lock waited on : ACCT_ON_PAGE << LOCK IT WANTS Schema of lock waited on : DB2INST1 Tablespace of lock waited on : ACCT_ON_PAGE Type of lock: Table Mode of lock: IX - Intent Exclusive Mode application requested on lock: S - Share Node lock occured on: 16 Lock object name: 4 Application Handle: 162 Deadlocked Statement: Type : Dynamic Operation: Fetch
Section : 4 Creator : NULLID Package : SYSSH400 Cursor : SQL_CURSH400C4 Cursor was blocking: FALSE Text : select URN_ACCT,NAME,DUNS_NUM,ACCT_HQ from adbgb.acct_on_page_gbp where ucase (name )like ucase ('%BRITISH%') and sub_ind not in 'zz' List of Locks: Database partition : 16 Lock Name : 0x012400040004C9030000000052 Lock Attributes : 0x00000010 Release Flags : 0x00000001 Lock Count : 1 Hold Count : 0 Lock Object Name : 313603 Object Type : Row << LOCKS IT HOLDS Tablespace Name : ACCT_ON_PAGE Table Schema : DB2INST1 Table Name : ACCT_ON_PAGE Mode : S - Share 161) Deadlocked Connection ... Deadlock ID: 2 Deadlock Node: 0 Participant no.: 1 Participant no. holding the lock: 2 Appl Id: *N0.db2adbem.081211074134 Appl Seq number: 0049 Appl Id of connection holding the lock: G991F348.F407.081211073246 Seq. no. of connection holding the lock: 0024 Lock wait start time: 12/11/2008 07:44:42.439291 Lock Name : 0x01240004000000000000000054 Lock Attributes : 0x00000000 Release Flags : 0x40000000 Lock Count : 1 Hold Count : 0 Current Mode : none Deadlock detection time: 12/11/2008 07:44:57.764633 Table of lock waited on : ACCT_ON_PAGE << LOCKS IT WANTS Schema of lock waited on : DB2INST1 Tablespace of lock waited on : ACCT_ON_PAGE Type of lock: Table Mode of lock: S - Share Mode application requested on lock: IX - Intent Exclusive Node lock occured on: 15 Lock object name: 4 Application Handle: 858 Deadlocked Statement: Type : Dynamic Operation: Execute Section : 3 Creator : NULLID Package : SYSSH200 Cursor : SQL_CURSH200C3 Cursor was blocking: FALSE Text : Update DB2INST1.ACCT_ON_PAGE Set Acct_Active=? Where URN_ACCT=? List of Locks: Database partition : 15 Lock Name : 0x000000320000000100016B0056 Lock Attributes : 0x00000000 Release Flags : 0x40000000 Lock Count : 1 Hold Count : 0 Lock Object Name : 0 Object Type : Internal Variation << LOCKS IT HOLDS Mode : S - Share
d. Edit the snapapps_yymmdd file listed for the deadlock time e. Search for the Appl Id value
ex: <esc> /G991F348.F407.081211073246
12/11/2008 07:31:03.911954 12/11/2008 07:31:03.914762 12 seconds ROY55683 IBMDMS057 IBMDMS057 SQL09051 3268 NT TCP/IP