Flashback Data Archive ( Oracle Total Recall ) introduced in 11g
Flashback Data Archive feature is part of Oracle Total Recall technology. Flashback Data Archive feature lets you to track changes made in any number of tables for any given retention time. The retention time can be some days or months or years.
Flashback data archives retain historical data for the time duration specified using the RETENTIONparameter. Historical data can be queried using the Flashback Query AS OF clause. Archived historic data that has aged beyond the specified retention period is automatically purged.
This feature is supported only Oracle 11g Enterprise Edition. It is not available in Standard or Express editions.
Lets see an example.
Step 1:- Create Flashback data archive tablespace.
SQL> select * from v$version;BANNER--------------------------------------------------------------------------------Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit ProductionPL/SQL Release 11.2.0.4.0 - ProductionCORE 11.2.0.4.0 ProductionTNS for Linux: Version 11.2.0.4.0 - ProductionNLSRTL Version 11.2.0.4.0 - ProductionSQL> create tablespace FB_Storage datafile '/u01/app/oracle11g/oradata/DB11/datafile/fdstore.dbf'2 size 100m autoextend on segment space management auto;Tablespace created.
Step 2:- Create Flashback Archive
SQL> create flashback archive default FB_Arch1 tablespace FB_Storage quota 1g retention 1 year;Flashback archive created.
Step 3:- Turn on Flashback archive for tables you want to track.
For Example to enable flashback archive for table Scott.emp
(i) Grant Flashback archive privilege
SQL> grant flashback archive on fb_arch1 to scott;Grant succeeded.SQL> connect scott/tigerConnected.
(ii) Enable flashback archive for table
SQL> alter table emp flashback archive;Table altered.
Step 4:- Flashback Example.
Suppose a user has deleted rows from emp by giving a delete statement like this
SQL> set time on19:57:32 SQL> select * from emp;DEPTNO DNAME LOC---------- -------------- -------------20 RESEARCH DALLAS30 SALES CHICAGO40 OPERATIONS BOSTON19:57:56 SQL>19:57:59 SQL>19:57:59 SQL>19:57:59 SQL>19:57:59 SQL> delete from emp where deptno=30;1 row deleted.19:58:25 SQL> commit;Commit complete.
To View the state of table emp 10 minutes before
19:58:29 SQL> select * from emp as of timestamp sysdate - 10 / (24*60);DEPTNO DNAME LOC---------- -------------- -------------10 ACCOUNTING NEW YORK20 RESEARCH DALLAS30 SALES CHICAGO40 OPERATIONS BOSTON
Versions Query (11gR2 only) (To see what changes are made to Emp No. 7902 between last 15 minutes
22:18:34 SQL> select * from emp versions betweentimestamp sysdate- 15 /(24*60) and sysdatewhere empno=7902;
Flashback Data Archive ( Oracle Total Recall ) introduced in 11g的更多相关文章
- oracle闪回、闪回数据归档Flashback Data Archive (Oracle Total Recall)的真正强大之处、11gR2增强以及合理使用
oracle的闪回很早就出来了,准确的说一直以来应该都较少被真正用户广为使用,除了dba和极少部分开发人员偶尔用于逻辑出错.误删恢复之外,较少被用于产生更有价值的用途. 各种闪回表flashback ...
- oracle flashback data archive闪回数据归档天坑之XID重用导致闪回查询数据重复
我们有个系统使用了Oracle flashback data archive闪回数据归档特性来作为基于时间点的恢复机制,在频繁插入.更新期间发现SYS_FBA_HIST_NNNN表中的XID被两个事务 ...
- flashback data archive (转)
闪回数据归档(Flashback Data Archive) 在Oracle 11g当中,对闪回技术再次进行了扩展,提供了一个全新的flashback方式,称之为闪回数据归档,本节我们将对闪回数据归档 ...
- [每日一题] 11gOCP 1z0-053 :2013-09-29 Flashback Data Archive ...................................6
转载请注明出处:http://blog.csdn.net/guoyjoe/article/details/12205299 正确答案:A 具体请参考:http://blog.csdn.net/guoy ...
- 11G新特性 -- flashback data archive(2)
创建Flashback Data Archive用户需要授予dba或flashback archive administer系统特权.flashback archive administer系统特权包 ...
- 11G新特性 -- flashback data archive(1)
虽然可以依赖undo数据来查询row的旧版本数据,甚至可以执行逻辑恢复.但是你不能期待在undo中找到非常旧的数据.undo数据主要是用来提供读一致性. 在11G中,提供了Flashback Data ...
- 闪回之 Flashback Data Archive
背景:Oracle 11g 中 Flashback Data Archive 特性.将变化数据另外存储到创建的闪回归档区(Flashback Archive)中,以和 undo 区别开来,这样就可以为 ...
- [每日一题] 11gOCP 1z0-053 :2013-10-11 Flashback Data Archive属性.........................43
转载请注明出处:http://blog.csdn.net/guoyjoe/article/details/12656897 正确答案:BD 闪回数据归档请参考:http://blog.csdn.net ...
- Oracle 闪回归档(Flashback Data Archive)
--检查权限 SELECT * FROM dba_sys_privs WHERE privilege LIKE '%FLASH%'; --设置权限 GRANT dba TO testuser;--设置 ...
随机推荐
- 将一张表的数据,拷贝到另一张表中sql
两张表的字段一样 create table 目标表 as select * from 原表;
- Linux下oracle数据库启动和关闭操作
第一步:登陆 root登陆之后切换到oracle用户上,输入 su oracle 第二步:连接 在oracle用户下,输入 sqlplus /nolog 第三步:使用管理员权限 输入 connect ...
- 总结libevent安装方法
1.先用:ls -al /usr/lib | grep libevent 查看是否已安装,如果已安装且版本低于1.3,则先通过:rpm -e libevent -nodeps 进行卸载. 2.下载l ...
- 个人对B/S项目的一些理解(二)
以下是我自工作以来,结合对C/S项目的认知,对B/S项目的一些理解. 如有不足或者错误,请各位指正. ----数据处理的升级 在上面的描述中,大家也看到了,远古时期的程序员,其实也听不容易 ...
- Ubuntu提示卷boot仅剩0字节的硬盘空间,解决办法
查看当前安装的linux内核版本号 dpkg --get-selections |grep linux-image 查看当前使用的内核版本号 uname -a 卸载不需要的内核 sudo apt-ge ...
- 【.net core 跨平台】第一步 在Ubuntu16.04 配置.net core环境
本次使用VMware10.0.4工具安装Ubuntu16.04系统并配置.net core环境 Ubuntu 16.04 desktop下载地址:http://releases.ubuntu.co ...
- SQL Sever无法打开链接对话框,未将对象引用设置到对象的实例。(AppIDPackage)
前几天刚做完系统,先装的是SQL Sever2008,装完后还试了一下,OK~没问题,然后就继续装VS2012等一些软件.搞到很晚没有继续试试就睡了,第二天运行SSMS出问题了..(如图 1.0 所示 ...
- R语言:ggplot2精细化绘图——以实用商业化图表绘图为例
本文版权归http://www.cnblogs.com/weibaar 本文旨在介绍R语言中ggplot2包的一些精细化操作,主要适用于对R画图有一定了解,需要更精细化作图的人,尤其是那些刚从exce ...
- frp配置
frps配置 --------------------------------------------------------------------------------------------- ...
- POJ1753(位操作和枚举)
题目:http://poj.org/problem?id=1753 题意:一块4*4的棋盘,黑白块不规律分布,翻动一个色块,其上下左右,都会被翻动,知道全黑全白为止.输出最小次数,达不到则输出“Imp ...