ITPub博客

首页 > 数据库 > Oracle > Oracle 11g 闪回归档

Oracle 11g 闪回归档

原创 Oracle 作者:LuiseDalian 时间:2014-05-05 07:19:06 0 删除 编辑

并不是可以查询在任何时刻、任何版本的信息,前提条件是得有足够的undo数据。

flashback archive提供了类似于归档重做日志的功能,可以让闪回可以走的更远。

--创建一个新的表空间(注意段空间管理一定得是auto)

sys@TESTDB11>create tablespace fbtbs datafile '/oradata/fbtbs01.dbf' size 200m

  2  segment space management auto;

 

Tablespace created.

--创建flashback archive

sys@TESTDB11>create flashback archive fba1 tablespace fbtbs quota 150m retention 1 year;

 

Flashback archive created.

 

sys@TESTDB11>grant flashback archive on fba1 to scott;

 

Grant succeeded.

 

--将表与归档关联起来

scott@TESTDB11>alter table dept flashback archive fba1;

 

Table altered.

 

--在创建表时将表与flashback archive直接关联起来

scott@TESTDB11>create table test1(id number) flashback archive fba1;

 

Table created.

 

--断开与flashback archive的关系

sys@TESTDB11>alter table scott.dept no flashback archive;

 

Table altered.

 

sys@TESTDB11>alter table scott.test1 no flashback archive;

 

Table altered.

 

scott@TESTDB11>drop table test1 purge;

 

Table dropped.

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/17013648/viewspace-1153860/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: Oracle 11g 闪回表
请登录后发表评论 登录
全部评论

注册时间:2012-02-06

  • 博文量
    1986
  • 访问量
    6040880