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/