您好,欢迎访问一九零五行业门户网

闪回数据归档的实验-oracle total recall

oracle 11g提供的新功能。通过这一功能oracle将undo数据进行归档,从而提供全面的历史数据查询。类似归档日志,11g新增的后台进程
闪回数据归档:oracle total recall oracle全面回忆功能。
oracle 11g提供的新功能。
通过这一功能oracle将undo数据进行归档,从而提供全面的历史数据查询。
类似归档日志,11g新增的后台进程fbda(flashback data archiver process)用于对闪回数据进行归档写出。
oracle可以指定闪回归档数据保存时间,并可以通过内部分区和压缩算法减少空间使用。
闪回数据归档需要独立的存储,使用此特性前需要创建独立的assm表空间。
ddl不允许使用在被fbda跟踪的table上(add column,rename和grant可以)。
开始实验:
1.建立fbda进程所需表空间-flash back data archive-闪回数据归档
21:44:32 sql> create tablespace bys_flashback datafile '/u01/app/oracle/oradata/bys001/bys_flashback.dbf' size 10m autoextend off;
tablespace created.
21:45:35 sql> show user
user is sys
default的fbda需要用sysdba登陆才能建立,并且只能有一个default的fbda
21:45:39 sql> create flashback archive default fbda1 tablespace bys_flashback retention 7 day;
flashback archive created.
21:46:36 sql> create flashback archive fbda2 tablespace bys_flashback quota 7m retention 10 day;
flashback archive created.
2.创建表并指定闪回归档属性,,记录dml操作前后scn21:47:52 sql> conn bys/bys
connected.
21:49:54 sql> create table test6(abc varchar2(9)) flashback archive;
table created.
创建的闪回归档表名?
alter table test6 no flashback archive;
插入数据,省略演示。
21:51:27 sql> select * from test6;
abc
---------
1
2
3
21:51:32 sql> select current_scn from v$database;
current_scn
-----------
1372223
21:51:44 sql> delete from test6 where abc=3;
1 row deleted.
21:52:12 sql> commit;
commit complete.
21:52:14 sql> host 这里的alert日志是从trace目录下源alert日志上做一个软链接,方便查看日志。
aa.t back1.sh desktop
alert_bys001.log back2-20130623-1144.log fullback.sh
archback.sh back2.sh rmanlog
back0.sh cumulative
3.从alert日志中查看闪回归档表空间的创建及fbda进程的启动[oracle@oel-01 ~]$ tail alert_bys001.log
suplog: unique = off, foreign key = off, all column = off
suplog: procedural replication = off
completed: alter database add supplemental log data
sun jun 23 21:45:33 2013
create tablespace bys_flashback datafile '/u01/app/oracle/oradata/bys001/bys_flashback.dbf' size 10m autoextend off
completed: create tablespace bys_flashback datafile '/u01/app/oracle/oradata/bys001/bys_flashback.dbf' size 10m autoextend off
sun jun 23 21:46:36 2013
starting background process fbda
sun jun 23 21:46:36 2013
fbda started with pid=33, os id=3961
[oracle@oel-01 ~]$ exit
exit
21:54:08 sql> show parameter undo
name type value
------------------------------------ ----------- ------------------------------
undo_management string auto
undo_retention integer 900
undo_tablespace string undotbs1
21:56:08 sql> col name for a40
21:56:20 sql> select file#,name from v$datafile where name like '%test%';
file# name
---------- ----------------------------------------
7 /u01/app/oracle/oradata/bys001/test1_undo.dbf
未使用此句:
drop tablespace undotbs1 including contents and datafiles;
相关阅读:
oracle 11g flashback data archive(闪回数据归档)  
oracle flashback闪回机制
flashback table快速恢复误删除的数据
oracle 备份恢复:flashback闪回
[oracle]闪回flashback功能的使用
本文的更多详情请继续阅读第2页的精彩内容:
其它类似信息

推荐信息