186.User A executes the following command to drop a large table in your database: SQL> DROP TABLE tr

来源:互联网 发布:手机检索专利软件 编辑:程序博客网 时间:2024/04/30 03:44
186.User A executes the following command to drop a large table in your database:
SQL> DROP TABLE trans;
While the drop table operation is in progress, user B executes the following command on the same table:
SQL> DELETE FROM trans WHERE tr_type='SL';
Which statement is true regarding the DELETE command?
A.It fails with a "Resource Busy" error.
B.It deletes the rows successfully because the table is locked in SHARE mode.
C.It fails to delete the records because the table is locked in EXCLUSIVE mode.
D.It deletes the rows successfully because the table is locked in SHARE ROW EXCLUSIVE mode.
答案:C
解析:
1.当执行alter table,drop table ,drop index,truncate table,lock exclusive的时候会造成X(exclusive)排他锁,因此排除B,选择C
2.当执行lock share row exclusive的时候会造成SSX(S/Row-X)共享行级别排他锁,排除D
3.当执行insert,update,delete,lock row share的时候会造成SX(Row-X)行级排他锁,在提交前不允许做dml操作,如果操作的话会提示ORA-00054
  也就是Resource Busy,因此排除A选项
0 0
原创粉丝点击