1.Oracle数据库版本信息
sys@secooler> select * from v$version;
BANNER
---------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
2.验证是否启用了flashback database
sys@secooler> select flashback_on,force_logging from v$database;
FLASHBACK_ON
------------------ ---
NO
这里显示没有开启闪回功能,同时force_logging也没有开启。
3.开启闪回功能和force logging
开启过程可以详细参考《【Flashback】启用Flashback闪回功能》http://space.itpub.net/?uid-519536-action-viewspace-itemid-590636
1)关闭数据库,启动到mount状态
sys@secooler> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
NotConnected@> startup mount;
ORACLE instance started.
Total System Global Area
Fixed Size
Variable Size
Database Buffers
Redo Buffers
Database mounted.
2)设置db_recovery_file_dest和db_recovery_file_dest_size参数
NotConnected@> alter system set db_recovery_file_dest='/oracle/ora11gR2/flash_recovery_area';
System altered.
NotConnected@> alter system set db_recovery_file_dest_size=4g scope=spfile;
System altered.
NotConnected@> show parameter db_recovery_file_dest
NAME
---------------------------------------- -------------------- ------------------------------------------------------------
db_recovery_file_dest
db_recovery_file_dest_size
3)重启数据库到mount状态
NotConnected@> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
NotConnected@> startup mount;
ORACLE instance started.
Total System Global Area
Fixed Size
Variable Size
Database Buffers
Redo Buffers