Investigating Deadlocks: Querying Shredded_LockTbl - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ - Database Administration

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-03
dita:mapPath
tgx1512080410608.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval
dita:id
ujp1472240543947
Product Category
Software
Teradata Vantage

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