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;--设置 ...
随机推荐
- Linux如何进行文件管理
Linux中的所有数据都被保存在文件中,所有的文件被分配到不同的目录.目录是一种类似于树的结构,称为文件系统.当你使用Linux时,大部分时间都会和文件打交道,通过本节可以了解基本的文件操作,如创建文 ...
- 15 个实用的 PHP 正则表达式
1:验证域名检验一个字符串是否是个有效域名 2:从一个字符串中 突出某个单词 3:从HTML文档中获得全部图片 如果你曾经希望去获得某个网页上的全部图片,这段代码就是你需要的,你可以轻松的建立一个图片 ...
- jquery toastr弹窗的代码和使用
<link href="toastr.css" rel="stylesheet" type="text/css" /> < ...
- 看着水了一天的群,终于看到一段高质量的代码了分享一下localStorage
_history : { //缓存 isLocalStorage:window.localStorage?true:false, set : function(key,value){ //设置缓存 i ...
- 12.Linux软件安装 (一步一步学习大数据系列之 Linux)
1.如何上传安装包到服务器 有三种方式: 1.1使用图形化工具,如: filezilla 如何使用FileZilla上传和下载文件 1.2使用 sftp 工具: 在 windows下使用CRT 软件 ...
- JDBC值事务
事务的四大特性: 原子性, 一致性(比如说A给B转账,A转了之后B的账户增加了,两个都完成才叫一致性),隔离性(A给B转账,A给C转账,AB和AC并发是无关的),永久性(转账之后 不可能复原,就是说不 ...
- Makefile的编写
makefile介绍 makefile的功能是管理源文件的编译链接,在makefile我们可以定义一系列的规则来指定哪些文件需要先编译,哪些文件需要后编译,哪些文件需要重新编译,甚至于进行更复杂的功能 ...
- 基于Unity3D 的Vuforia SDK开发基础教程
最新博客地址已转到: http://blog.csdn.net/zzlyw?viewmode=contents ------------------------------------------ ...
- docker版wordpress
拉取wordpress镜像 docker pull wordpress:latest 创建mysql 容器docker run --name wordpress-mysql -e MYSQL_ROOT ...
- PHP基础
$a=10; //$b="hello";//$a=(string)$a; 强制转换A的类型为字符串 //settype($a,"string");//var_d ...