ITPub博客

首页 > 数据库 > Oracle > Oracle OCP IZ0-053 Q166(Flashback Data Archive)

Oracle OCP IZ0-053 Q166(Flashback Data Archive)

原创 Oracle 作者:abstractcyj 时间:2016-03-18 15:09:51 0 删除 编辑
166.Exhibit:

View the Exhibit and examine the output.
You executed the following command to enable Flashback Data Archive on the EXCHANGE_RATE table:
ALTER TABLE exchange_rate FLASHBACK ARCHIVE;
What is the outcome of this command?
A. The Flashback Archive is created on the same tablespace where the tables are stored.
B. The Flashback Archive is created on the SYSAUX tablespace.
C. The command generates an error because no Flashback Archive name is specified and there is no
default Flashback Archive.
D. The table uses the default Flashback Archive.
Answer: C

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

验证:
[oracle@db01 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Fri Mar 18 01:37:09 2016
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL> select FLASHBACK_ARCHIVE_NAME,STATUS from DBA_FLASHBACK_ARCHIVE;
no rows selected
SQL> select name from v$tablespace;                                                                                     


NAME
------------------------------
SYSTEM
SYSAUX
UNDOTBS1
USERS
EXAMPLE
TEMP
USER_DATA
7 rows selected.
SQL> create flashback archive fla1 tablespace user_data quota unlimited retention 1 year;
create flashback archive fla1 tablespace user_data quota unlimited retention 1 year
                                                         *
ERROR at line 1:
ORA-55603: Invalid Flashback Archive command
SQL> create flashback archive fla1 tablespace user_data quota 100M retention 1 year;
Flashback archive created.
SQL> select FLASHBACK_ARCHIVE_NAME,STATUS from DBA_FLASHBACK_ARCHIVE;
FLASHBACK_ARCHIVE_NAME
--------------------------------------------------------------------------------
STATUS
-------
FLA1
SQL> alter table scott.dept flashback archive;
alter table scott.dept flashback archive
*
ERROR at line 1:
ORA-55608: Default Flashback Archive does not exist
SQL> alter flashback archive FLA1 set default;
Flashback archive altered.
SQL>  select FLASHBACK_ARCHIVE_NAME,STATUS from DBA_FLASHBACK_ARCHIVE;
FLASHBACK_ARCHIVE_NAME
--------------------------------------------------------------------------------
STATUS
-------
FLA1
DEFAULT




SQL> alter table scott.dept flashback archive;


Table altered.


如何查询archive的transaction:
select * from DBA_FLASHBACK_ARCHIVE_TS;
update scott.dept t set t.loc = t.loc||'1'
SELECT owner_name,
       table_name,
       flashback_archive_name,
       archive_table_name,
       status
FROM   dba_flashback_archive_tables
ORDER BY owner_name, table_name;

select * from scott.SYS_FBA_HIST_87106


select * from all_objects where object_name = 'SYS_FBA_HIST_87106'


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

请登录后发表评论 登录
全部评论
曾从事java方向开发多年。近年已经转入数据库方向。主要擅长SQL优化,Oracle数据库问题诊断,Oracle备份与恢复等。服务于医药物流,医院等行业

注册时间:2010-01-26

  • 博文量
    602
  • 访问量
    1091616