OCP-IZO-053_QUESTION385

QUESTION NO: 385  

Which of the following statements is true regarding implementing a Flashback Table recovery? 

A. An SCN is never used to perform a Flashback Table recovery.

B. If a significant number of changes have been made to the table, row movement must be enabled. 

C. The tablespace must be offline before performing a Flashback Table recovery.

D. Flashback Table recovery is completely dependent on the availability of undo data in the undo tablespace.

 

【题目示意】

此题考查有关于Flashback Table 的相关知识。

【解析】

     Flashback Table可以使表的状态恢复早期事务或应用程序错误之前。时间可以闪回过去的表依赖是undo data的数据的数量。此外,Oracle数据库不能恢复任何DDL操作修改表的结构的表的状态。

      Flashback Table可以闪回表到之前的SCN,时间戳,恢复点上。

【实验】

1)查看表数据和时间点

SQL> conn hr/oracle

SQL> alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';

 

Session altered.

 

SQL> select sysdate from dual;

 

SYSDATE

-------------------

2014-02-03 14:25:35

 

SQL> select * from test;

 

         A

----------

         1

         2

         3

 

2)删除表中的数据

SQL> delete from test;

3 rows deleted.

 

SQL> commit;

Commit complete.

 

SQL> select * from test;

no rows selected

 

3)没有开启行迁移时对表进行闪回

SQL> flashback table test to timestamp to_timestamp('2014-02-03 14:25:35','yyyy-mm-dd hh24:mi:ss');

flashback table test to timestamp to_timestamp('2014-02-03 14:25:35','yyyy-mm-dd hh24:mi:ss')

                *

ERROR at line 1:

ORA-08189: cannot flashback the table because row movement is not enabled

可以看到没有成功

4)开启表的行迁移

SQL> alter table test enable row movement;

 

Table altered.

 

5)对表进行闪回

SQL> flashback table test to timestamp to_timestamp('2014-02-03 14:25:35','yyyy-mm-dd hh24:mi:ss');

 

Flashback complete.

 

SQL> select * from test;

 

         A

----------

         1

         2

         3

【小结】

  1) A。可以用SCN指定时间点进行表闪回。A错误

  2) B. 要进行表闪回,就得开启行迁移。B错误

  3) C. 进行表闪回的时候,表不需要离线。C错误

  4) D. 表闪回是依赖undo tablespace中的undo data。D正确

【答案】 D

 

相关参考

http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_9012.htm#BABCCCCD

http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_9012.htm#SQLRF54995

 

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

转载于:http://blog.itpub.net/29435844/viewspace-1078502/

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值