Oracle OCP IZ0-053 Q166(Flashback Data Archive)

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博客 ” ,链接:http://blog.itpub.net/8520577/viewspace-2059546/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/8520577/viewspace-2059546/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值