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