052-172

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
On investigation, you find that a session opened by user JIM has a transaction that caused the deadlock.
Which two statements are true regarding the session of SCOTT in this scenario? (Choose two.)
A.The session is terminated after receiving the error and JIM can continue with his transaction.
B.SCOTT should perform a COMMIT or ROLLBACK to allow JIM to continue with his transaction.
C.The session is rolled back after receiving the error and JIM can continue with his transaction.
D.SCOTT has to reexecute the last command in the transaction after he commits the transaction.

死锁相关 https://www.cnblogs.com/kerrycode/p/6928263.html 
  死锁是锁定冲突的特殊示例。两个或多个会话等待由对方锁定的数据时,就会发生死锁。因为每个会话都在等待另一个会话释放锁定,所以任何一个会话都不能完成事务处理,也不能解决冲突。 Oracle 数据库会自动检测死锁并终止语句,同时显示错误消息。更正这种错误的适当做法是执行提交或回退,这样做会在一个会话中释放任何其它锁定,以便其它会话可继续完成其事务处理。 scott 必须提交或回退,才能更正检测到的死锁误。如果执行提交,则必须重新提交第二次更新才能完成事务处理。如果执行回退,则必须同时重新提交这两个语句才能完成事务处理。

posted @ 2017-12-15 11:05  巴啦啦大魔王  阅读(178)  评论(0编辑  收藏  举报