Detecting and managing  deadlocks


Deadlocks occur when a transaction cannot proceed because it is dependent on exclusive resources that are locked by some other transaction, which is in turn dependent on exclusive resources in use by the original transaction. You can use PATROL for DB2 UDB to monitor deadlocks in a database. To monitor deadlocks, the KM using DB2 Event Monitoring which can impact performance. BMC recommends that you only run deadlock detection during the time that you suspect that there might be deadlocks in the database.

To monitor deadlocks in PATROL, you must first activate deadlock detection with the Monitor Deadlocks command. You access the Deadlock Detection menu from the DB2 database icon.

The Lock icon appears in a database object window and serves as a container for the parameters associated with database locks.

  1. Right-click on the database icon and select Deadlock Detection.
  2. select one of the following commands from the Deadlock Detection menu:
    • Monitor Deadlocks
    • Pause Deadlock Detection
    • Resume Deadlock Detection
    • Stop Deadlock Detection
    • Show Deadlocks

      Note

      After stopping deadlock detection with the Stop Deadlock Detection command, you must use the Monitor Deadlocks command to restart detection. You can also get information about deadlocks by double-clicking the Deadlock parameter in the Lock container window. For information about the Deadlocks Alarm, see Acknowledging the Deadlocks alarm#AcknowledgingtheDeadlocksalarm-35115.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*