150.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 resourceOn 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:It is terminated after receiving the error and JIM can continue with his transaction.B:The transaction in it is terminated after receiving the error and JIM can continue
with his transaction.C:SCOTT should perform a COMMIT or ROLLBACK to allow JIM to continue with his transaction.D:SCOTT has to reexecute the last command in the transaction after he commits the
transaction.Correct Answers: C, D
为什么A不对,我觉得收到错误信息之后就应该表示 scott执行update结束了 ,jim的transaction会继续执行

解决方案 »

  1.   

    update 是DML操作,更改的数据还没有存入数据库。
    要commit或者rollback后才正式入库。
      

  2.   

    UPDATE这个操作是结束了,但SCOTT的会话并没有被终止,还可以继续执行下一个命令。而A选项是问收到错误信息后会话被终止。
      

  3.   

    虽然出现错误,但SCOTT所在这个会话并没有终止。
    (也可以反推,如果会话终止,则会COMMIT,也就不会死锁了。