OCP-1Z0-052-V8.02-58题

58. View the Exhibit and examine the parameters. 

User A executes the following command to update the TRANS table:

SQL> UPDATE B.trans SET tr_amt=tr_amt+500 WHERE c_code='C005';

Before user A issues a COMMIT or ROLLBACK command, user B executes the following command on

the TRANS table:

SQL> ALTER TABLE trans MODIFY (tr_type VARCHAR2(3));

What would happen in this scenario?

A.The ALTER TABLE command modifies the column successfully.

B.The DDL operation gets higher priority and transaction for user A is rolled back.

C.The ALTER TABLE command waits indefinitely until user A ends the transaction.

D.The ALTER TABLE command fails after waiting for 60 seconds due to the resource being busy.

Answer: D  

答案解析:

参考:http://blog.csdn.net/rlhua/article/details/12652569


每个DML 事务处理必须获得两个锁:
• 针对正在更新的一行或多行的EXCLUSIVE 行锁
• 针对包含这些行的表的ROW EXCLUSIVE (RX) 模式下的表锁(TM)。
这可避免在进行更改时另一会话锁定整个表(可能会删除或截断表)。这种模式也称为子排它表锁(SX)。
对表执行ROW EXCLUSIVE 锁定时,会禁止DDL 命令在未提交的事务处理进行到一半时更改字典元数据。这样便可在事务处理的有效期内保持字典完整性和读取一致性。

DDL_LOCK_TIMEOUT specifies a time limit for how long DDL statements will wait in a DML lock queue . The default value of zero indicates a status of   NOWAIT . The maximum value of 1,000,000 seconds will result in the DDL statement waiting forever to acquire a DML lock.

If a lock is not acquired before the timeout period expires, then an error is returned.


 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值