nerdexam
Oracle

1Z0-497 · Question #60

The session of user SCOTT receives the following error after executing an UPDATE command on the EMP table: ERROR at line 1: ORA-00060: deadlock detected while waiting for resource You find out that…

The correct answer is B. SCOTT should perform a COMMIT or ROLLBACK to allow JIM to continue with his transaction. D. SCOTT has to re-execute the last command in the transaction after he commits the transaction. A deadlock can occur when two or more users are waiting for data locked by each other. Deadlocks prevent some transactions from continuing to work Deadlock Detection Oracle automatically detects deadlock situations and resolves them by rolling back one of the statements…

Managing the Database Instance

Question

The session of user SCOTT receives the following error after executing an UPDATE command on the EMP table:

ERROR at line 1:

ORA-00060: deadlock detected while waiting for resource You find out that a session opened by user JIM has a transaction that caused the deadlock. Which two statements are true about SCOTT's session in this scenario?

Options

  • AThe session is terminated after receiving the error and JIM can continue with his transaction.
  • BSCOTT should perform a COMMIT or ROLLBACK to allow JIM to continue with his transaction.
  • CThe session is rolled back after receiving the error and JIM can continue with his transaction.
  • DSCOTT has to re-execute the last command in the transaction after he commits the transaction.

How the community answered

(30 responses)
  • A
    10% (3)
  • B
    83% (25)
  • C
    7% (2)

Explanation

A deadlock can occur when two or more users are waiting for data locked by each other. Deadlocks prevent some transactions from continuing to work Deadlock Detection Oracle automatically detects deadlock situations and resolves them by rolling back one of the statements involved in the deadlock, thereby releasing one set of the conflicting row locks. A corresponding message also is returned to the transaction that undergoes statement-level rollback. The statement rolled back is the one belonging to the transaction that detects the deadlock. Usually, the signalled transaction should be rolled back explicitly, but it can retry the rolled-back statement after waiting.

Topics

#deadlock#ORA-00060#transaction rollback#locking

Community Discussion

No community discussion yet for this question.

Full 1Z0-497 Practice