OCP题库解析-1z0-053-QUESTION-NO.615

【关键词】 Flashback,闪回

     615.Before a Flashback Table operation, you execute the following command: ALTER TABLE employees ENABLE ROW MOVEMENT;

     Why would you need this to be executed?

     A. Because row IDs may change during the flashback operation

     B. Because the object number changes after the flashback operation

     C. Because the rows are retrieved from the recycle bin during the flashback operation

     D. Because the table is moved forward and back to a temporary during the flashback opertion 

【题目示意】

     考察Flashback相关知识

【解析】

      Before you can use Flashback Table, you must ensure that row movement is enabled on the table to be flashed back, or returned to a previous state. Row movement indicates that rowids will change after the flashback occurs. This restriction exists because if rowids before the flashback were stored by an application, then there is no guarantee that the rowids will correspond to the same rows after the flashback.

       当flashback时会造成rowID改变。

【实验】

     实验环境:CenOS_6.3-x86,Oracle 11G x86

     实验目的:证明在flashback table前,需要执行ALTER TABLE xxxx ENABLE ROW MOVEMENT

     实验步骤:

          1、创建表,并查询当前SCN

 

 

2、对表中数据进行更改,并提交

 

 

3、不执行ALTER TABLE scott.emp ENABLE ROW MOVEMENT进行闪回,和执行ALTER TABLE scott.emp ENABLE ROW MOVEMENT返回的结果

 

 

      实验结果 :

       flashback table前,需要执行ALTER TABLE xxxx ENABLE ROW MOVEMENT

       不执行将会报错ORA-08189

       实验代码:

http://app.yinxiang.com/shard/s8/sh/28b6b798-958e-4c29-8c3b-ded460a9cc5b/80618e55191431fe9a7ef38c6febb9f5
http://pan.baidu.com/s/1gdeJtjt

【小结】

               在flashback 时,为了保证rowID不发生变化,应该使用ALTER TABLE xxxxx ENABLE ROW MOVEMENT;

【答案】:A


相关参考:

http://docs.oracle.com/cd/E11882_01/server.112/e10897/backrest.htm#ADMQS09431


                                                                                                                                                                 DB_Loki

                                                                                                                                                               2014-01-28

Mail:dearloki@hotmail.com

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26751012/viewspace-1076365/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26751012/viewspace-1076365/

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值