Home > DBA, Oracle > The Bottom Line About Oracle Deadlocks (Sequel to It Was a Dark and Stormy Night)

The Bottom Line About Oracle Deadlocks (Sequel to It Was a Dark and Stormy Night)


Here’s the bottom line to my last post It Was a Dark and Stormy Night (A Story About Deadlocks):

Oracle Database handles deadlocks differently than other database engines such as SQL Server and DB2. The transaction of the selected victim is not rolled back; only its last statement is rolled back. All the other participants in the deadlock are still blocked, except the selected victim. If the selected victim retries its last statement, a deadlock will happen again, though some other participant may be picked as the victim this time. The selected victim should rollback its transaction but Oracle won’t do this automatically.

How SQL Server Handles Deadlock (the selected victim’s transaction is rolled back)
How DB2 Handles Deadlock (the selected victim’s transaction is rolled back)
How Sybase Handles Deadlock (the selected victim’s transaction is rolled back)
How Informix Handles Deadlock (deadlocks are not allowed to happen)
How MySQL Handles Deadlock (the selected victim’s transaction is rolled back)
How PostgresSQL Handles Deadlock (the selected victim’s transaction is rolled back)
How Ingres Handles Deadlock (the selected victim’s transaction is rolled back)

Categories: DBA, Oracle
  1. March 9, 2010 at 6:17 pm

    “All the other participants in the deadlock are still blocked”
    Being picky, if the other participant(s) are locking with a WAIT timeout specified, their statement would rollback when it hit the timeout which *might* resolve the problem.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: