小实验,开启闪回和关闭闪回。

12c RAC 闪回环境
实际上就是后台启动了rvwr这个进程,然后自动创建了一个flashback目录,然后写入闪回日志而已。当我们临时想清理闪回日志,只要关闭闪回就可以了,系统会自动delete闪回日志的。

SYS@orcl1> alter database flashback off;

Database altered.

看日志

2018-01-06 09:46:54.618000 +08:00
RVWR shutting down  --关闭进程
Deleted Oracle managed file +DATADG/ORCL/FLASHBACK/log_1.355.964691155
Deleted Oracle managed file +DATADG/ORCL/FLASHBACK/log_2.357.964691159
Flashback Database Disabled 
Completed: alter database flashback off

看asm目录

ASMCMD [+datadg/orcl/flashback] > ls
log_1.355.964691155
log_2.357.964691159
ASMCMD [+datadg/orcl/flashback] > ls
ASMCMD-8002: entry 'flashback' does not exist in directory '+datadg/orcl/'
ASMCMD [+datadg/orcl/flashback] >

启动闪回

SYS@orcl1> alter database flashback on;

Database altered.

SYS@orcl1> 

看日志,实际是后天进程启动RVWR

alter database flashback on
Starting background process RVWR
RVWR started with pid=33, OS id=17582  --启动进程
2018-01-06 09:51:26.483000 +08:00
Flashback Database Enabled at SCN 11549479
Completed: alter database flashback on

asm自动创建目录

ASMCMD [+datadg/orcl/flashback] > ls -l
Type       Redund  Striped  Time             Sys  Name
FLASHBACK  UNPROT  COARSE   JAN 06 09:00:00  Y    log_1.357.964691481
FLASHBACK  UNPROT  COARSE   JAN 06 09:00:00  Y    log_2.355.964691483
ASMCMD [+datadg/orcl/flashback] >