-- 查看参数 db_recovery_file_dest 和 db_recovery_file_dest_size 参数
-- 保证下面两个参数分别指定了路径和大小
-- 查看参数 db_flashback_retention_target 参数,参数的单位是分钟, 默认值是 60 * 24 = 1440 分钟
-- 查看数据库归档是否开启,开启闪回数据库需要保证数据库归档也必须开启
-- 关闭数据库,并启动到 mount 状态
-- 打开闪回数据库功能
-- 通过查询 v$database 中 flashback_on 字段的值来确定是否开启成功
-- 保证下面两个参数分别指定了路径和大小
点击(此处)折叠或打开
- SYS@RAC1> show parameter db_recovery_file_dest
-
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- db_recovery_file_dest string /u01/app/oracle/flash_recovery
- _area
- db_recovery_file_dest_size big integer 4G
点击(此处)折叠或打开
- SYS@RAC1> show parameter db_flashback_retention_target
-
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- db_flashback_retention_target integer 1440
点击(此处)折叠或打开
- SYS@RAC1> archive log list
- Database log mode Archive Mode
- Automatic archival Enabled
- Archive destination USE_DB_RECOVERY_FILE_DEST
- Oldest online log sequence 7
- Next log sequence to archive 9
- Current log sequence 9
点击(此处)折叠或打开
- SYS@RAC1> shutdown immediate
- Database closed.
- Database dismounted.
- ORACLE instance shut down.
- SYS@RAC1> startup mount
- ORACLE instance started.
-
- Total System Global Area 830930944 bytes
- Fixed Size 2257800 bytes
- Variable Size 524291192 bytes
- Database Buffers 301989888 bytes
- Redo Buffers 2392064 bytes
- Database mounted.
点击(此处)折叠或打开
- SYS@RAC1> alter database flashback on;
-
- Database altered.
点击(此处)折叠或打开
- SYS@RAC1> select flashback_on from v$database;
-
- FLASHBACK_ON
- ------------------
- YES
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31369239/viewspace-2123251/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/31369239/viewspace-2123251/