17.00 - 17.05 - Investigating Deadlocks: Querying Shredded_LockTbl - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - Database Administration

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
17.05
Published
June 2020
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
rgu1556127906220.ditamap
dita:ditavalPath
lze1555437562152.ditaval

In the following scenario, the user received an error message indicating an AMP deadlock, which happens if two sessions simultaneously try to lock the same table. The following example provides further information about the aborted request that caused the error message.

SELECT
QueryId,
DatabaseName,
TableName,
UserName,
AccountName,
OperationType,
JobType,
LockTypeRequested,
LockObjectRequested,
ErrorText,
AbortFlag,
ErrorCode
FROM TargetDBName.Shredded_LockTbl
WHERE AbortFlag = 1 and ErrorCode = 2631;

The following output provides details about the blocking transaction and the first transaction that is blocked by it.

*** Query completed. 3 rows found. 8 columns returned. 
 *** Total elapsed time was 1 second.


     queryid  307184741735818131.
DatabaseName USER1
   TableName t3
   UserName USER1
AccountName ?
OperationType Asynch Abort Release lock message
JobType AmpStep
LockTypeRequested Write
LockObjectRequested R
   ErrorText Amp deadlocking
   AbortFlag TRUE
   ErrorCode        2631
     queryid  307184741735818130.
DatabaseName USER1
   TableName t3
    UserName USER1
AccountName ?
OperationType Asynch Abort Release lock message
JobType AmpStep
LockTypeRequested Write
LockObjectRequested R
   ErrorText Amp deadlocking
   AbortFlag TRUE
   ErrorCode        2631