Oracle Locks   «Prev 

Database Deadlock Occurence

1) Task grabs row 123 with an exclusive lock.

2) Task B grabs row number 456 with an exclusive lcok.

3) Task A row requests row 456, and begins waiting for Task B to release the lock.

4) Task B now requests row 123. Since Task A is waiting for task B to release row 345.both jobs will wait perpetually for the other task to release their lock.

5) Fortunately, Oracle will kill task B with an ORA-60 error.