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;--设置 ...
随机推荐
- nginx服务器命令
nginx -s reload :修改配置后重新加载生效 nginx -s reopen :重新打开日志文件nginx -t -c /path/to/nginx.conf 测试nginx配置文件是 ...
- bootstrap Table 中给某一特定值设置table选中
bootstrap Table 中给某一特定值设置table选中 需求: 如图所示:左边地图人员选定,右边表格相应选中. 功能代码: //表格和图标联动 function changeTableSel ...
- 爬取https页面遇到“SSLError: hostname 'xxx' doesn't match either of”的解决方法
使用python requests 框架包访问https://itunes.apple.com 页面是遇到 SSLError: hostname 'itunes.apple.com' doesn't ...
- mysql 目录的了解以及Linux
Linux 目录 描述 / ...
- 搭建zookeeper集群
简介: Zookeeper 分布式服务框架是 Apache Hadoop 的一个子项目,它主要是用来解决分布式应用中经常遇到的一些数据管理问题,如:统一命名服务.状态同步服务.集群管理.分布式应用配置 ...
- mybatis逆向工程生成JavaBean、dao、mapper generatorSqlmapCustom
import java.io.File; import java.util.ArrayList; import java.util.List; import org.mybatis.generator ...
- ovirt配置为cas登录
准备工作 Ovirt测试机.CAS服务器.AD服务器 cas.crt -- CAS服务器的CA证书 allwinner.cer -- CAS服务器的证书颁发机构根证书 Ovirt测试机要求:apach ...
- kali python pip3 的安装和卸载
今天很高兴安装完成调整了kali 然后看见kali已经帮助我安装了python2.7和python3.5可把我开心坏了,可是2.7有pip,而且包很全,但2.7与3.0切换使用我的就尴尬了 最后在su ...
- ubuntu 搞坏了sudoers文件之修复方案
pkexec visudo askubuntu原回答摘抄如下 On a modern Ubuntu system (and many other GNU/Linux distributions), f ...
- QML杂记
1.QML编写可视化元素,运行后程序窗口上无显示.检查电脑的显卡是否支持OpenGL,如果支持请更新显卡驱动. 2.加载图片显示QML Image: Cannot open.解决在qml.qrc右击添 ...