开启 oracle 的闪回功能
Posted xingyys
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了开启 oracle 的闪回功能相关的知识,希望对你有一定的参考价值。
查看是否开启闪回
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
NO
查看是否配置了db_recover_file_dest
SQL> show parameter db_recovery
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string
db_recovery_file_dest_size big integer 0
没有配置的话,先创建对应的目录,注意目录的权限和oracle数据库的一致
mkdir /u01/flashback
chown oracle:oinstall /u01/flashback
SQL> alter system set db_recovery_file_dest_size=30G scope=both;
SQL> alter system set db_recovery_file_dest='/u01/flashback' scope=both;
System altered.
关闭 oracle
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
启动到 mount 状态
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1603411968 bytes
Fixed Size 2253664 bytes
Variable Size 905972896 bytes
Database Buffers 687865856 bytes
Redo Buffers 7319552 bytes
Database mounted.
开启 archeve log
SQL> alter database archivelog;
Database altered.
开启闪回功能
SQL> alter database flashback on;
Database altered.
启动数据库到 open 状态
SQL> alter database open;
Database altered.
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
YES
以上是关于开启 oracle 的闪回功能的主要内容,如果未能解决你的问题,请参考以下文章