database11gR2闪回配置

           开启database11gR2闪回配置

 

1 事务闪回(行级操作)
show parameter undo;
select flashback_on from v$database;
ALTER SYSTEM SET undo_retention=2880 SCOPE=BOTH;
1.2 创建undo表空间
CREATE UNDO TABLESPACE undotbs3
DATAFILE 'D:demoundotbs3.dbf' SIZE 10M;
1.3 切换表空间
ALTER SYSTEM SET undo_tablespace=undotbs3;
1.4 防undo_sql为空
alter database add supplemental log data;  

2 回收站管理(drop)
show recyclebin;
show user_recyclebin;
flashback table test to before drop;

3 数据库闪回
show parameter db_flashback_retention_target;
show parameter db_recovery;
shutdown immediate;
startup mount;
select flashback_on from v$database;
alter database flashback on;
alter system set LOG_ARCHIVE_DEST='';
alter system set LOG_ARCHIVE_DUPLEX_DEST='';
alter system set LOG_ARCHIVE_DEST_1='location=/data/oracle/arch';
alter system set db_recovery_file_dest='/data/oracle/recovery';
alter database archivelog;
alter database open;
show parameter db_recovery;


 

你可能感兴趣的:(闪回,ORACKE闪回)