Monitoring Deadlocks

SAP Monitor for deadlocks

ST04

A deadlock situation that occurs is logged in the database error log. This happens irrespective of the application whose database transaction is terminated.

Short dump analysis (ST22)

If an SAP work process terminated a database transaction, the system writes an ABAP short dump with the DBIF_RSQL_SQL_ERROR error. You can use transaction ST22 to view and analyze this short dump. In this transaction, there is a very detailed description of the deadlock situation with all parameters that are required for an in-depth analysis. In particular, you can find the terminated ABAP program and the affected program lines. This also reveals the table on which the deadlock occurred.

System Log (SM21)

Transaction SM21 displays the SAP system log. The system logs a deadlock here as an error. The system specifies the SAP work process that is affected. The entry Deadlock occurred includes the text of the database error.

15:47:13 SPO 35 000 SAPSYS BYO Deadlock occurred

15:47:14 SPO 35 000 SAPSYS BY4 Database error 1205 at SEL access to table TSP02

15:47:14 SPO 35 000 SAPSYS BY0 > Transaction (Process ID 1026)

Developer trace file of the work process (ST11 or SM50)

The work process that becomes the victim of a deadlock notes this database error in the developer trace file and includes information about the command that was executed. The affected work process is in the system log. This is an example of an entry:

B ***LOG BY4=> sql error 1205 performing SEL on table TSP02 [dbtran 6980 ]

B ***LOG BY0=> Transaction (Process ID 1026) was deadlocked on lock resources with another process and has been chosen as the dead