闪回恢复区开启
闪回恢复区开启需要先指定闪回恢复区大小(db_recovery_file_dest_size),再指定闪回恢复区目录(db_recovery_file_dest)。
1、设置db_recovery_file_dest_size参数大小
SQL> alter system set db_recovery_file_dest_size=2048m;
System altered.
2、设置db_recovery_file_dest值
SQL> alter system set db_recovery_file_dest='/u01/app/oracle/PROD2';
System altered.
3、查看修改后参数值
SQL> show parameter recovery
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /u01/app/oracle/PROD2
db_recovery_file_dest_size big integer 2G
4、开启闪回功能
SQL> alter database flashback on;
Database altered.
5、查询是否开启成功
SQL> select NAME,LOG_MODE,FORCE_LOGGING,FLASHBACK_ON from v$database;
NAME LOG_MODE FOR FLASHBACK_ON
--------- ------------ --- ------------------
PROD2 ARCHIVELOG YES YES