Investigating Deadlocks: Querying Shredded_LockTbl - Analytics Database - Teradata Vantage

Database Administration

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2024-10-04
dita:mapPath
pgf1628096104492.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
ujp1472240543947
lifecycle
latest
Product Category
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