ITPub博客

首页 > 数据库 > Oracle > 1Z0-053 V13.02 Q666

1Z0-053 V13.02 Q666

原创 Oracle 作者:cow977 时间:2016-06-07 10:53:18 0 删除 编辑
666.You are working in an online transaction processing (OLTP) environment. You use the FLASHBACKTABLE command to flash back the CUSTOMERS table. Before executing the FLASHBACK TABLE command, the system change number (SCN) was 663571. After flashing back the CUSTOMERS table, you realize that the table is not in the correct state. Now, you need to reverse the effects of the FLASHBACK TABLE command. Which is the fastest and the most efficient option to reverse the effects of the FLASHBACK TABLE command?
A. Restore the backup control file and open the database with RESETLOGS option.
B. Perform point-in-time recovery because flashback cannot be performed again on this table
C. Execute the FLASHBACK DATABASE statement to retrieve the CUSTOMERS table as it was at SCN 663571
D. Execute another FLASHBACK TABLE statement to retrieve the CUSTOMERS table as it was at SCN 663571
Answer: D

直接再次使用FLASHBACK TABLE返回到另一个SCN。

SQL> conn hr/hr
已连接。
SQL> show user;
USER 为 "HR"

SQL> create table cow977(name varchar2(10));

表已创建。

SQL> insert into cow977 values ('Zambia');

已创建 1 行。

SQL> insert into cow977 values ('Zimbabwe');

已创建 1 行。

SQL> insert into cow977 values ('Zamibia');

已创建 1 行。

SQL> commit;

提交完成。

SQL> select dbms_flashback.get_system_change_number from dual;

GET_SYSTEM_CHANGE_NUMBER
------------------------
                 4240148


SQL> update cow977 set name='Namibia';

已更新3行。

SQL> commit;

提交完成。

SQL> select dbms_flashback.get_system_change_number from dual;

GET_SYSTEM_CHANGE_NUMBER
------------------------
                 4240162

SQL> flashback table cow977 to scn 4240148;
flashback table cow977 to scn 4240148
                *
第 1 行出现错误:
ORA-08189: 因为未启用行移动功能, 不能闪回表


SQL> alter table cow977 enable row movement;

表已更改。

SQL> flashback table cow977 to scn 4240148;

闪回完成。

SQL> select * from cow977;

NAME
----------
Zambia
Zimbabwe
Zamibia

SQL> flashback table cow977 to scn 4240162;

闪回完成。

SQL> select * from cow977;

NAME
----------
Namibia
Namibia
Namibia

SQL> drop table cow977;

表已删除。

SQL>

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

上一篇: 1Z0-053 V13.02 Q212
下一篇: 1Z0-053 V13.02 Q675
请登录后发表评论 登录
全部评论

注册时间:2011-03-02

  • 博文量
    698
  • 访问量
    893874