4. 根据上文中提示的错误号使用oerr命令排错 $ oerr ORA 3870938709, 00000, "Recovery Area is not enabled."//*Cause: An ALTER DATABASE FLASHBACK ON commandfailed because the//Recovery Area was not enabled.//*Action: Set DB_RECOVERY_FILE_DEST to a location and retry. 5. 从上述的提示中找到错误原因:DB_RECOVERY_FILE_DEST 没有预设 SQL> show parameter DB_RECOVERY_FILE_DESTNAMETYPE VALUE------------------------------------ ----------- ------------------------------db_recovery_file_dest stringdb_recovery_file_dest_size big integer0 6. 设置DB_RECOVERY_FILE_DEST SQL> altersystem setdb_recovery_file_dest="/opt/oracle/fast_recovery_area";altersystem setdb_recovery_file_dest="/opt/oracle/fast_recovery_area"*ERROR atline 1:ORA-02097: parameter cannot be modified because specified value isinvalidORA-19802: cannot use DB_RECOVERY_FILE_DEST without DB_RECOVERY_FILE_DEST_SIZE 7. 使用oerr命令排错 $ oerr ORA 1980219802, 00000, "cannot use DB_RECOVERY_FILE_DEST without DB_RECOVERY_FILE_DEST_SIZE"//*Cause: There are two possible cause forthis error://1) The DB_RECOVERY_FILE_DEST parameter was inuse when no//DB_RECOVERY_FILE_DEST_SIZE parameter was encountered while//fetching initialization parameter.//2) An attempt was made to setDB_RECOVERY_FILE_DEST with the//ALTER SYSTEM commandwhen no DB_RECOVERY_FILE_DEST_SIZE//was inuse.//*Action: Correct the dependency parameter definitions and retry the command. 8. 从上述错误原因与解决方案提示中得知需要先设置DB_RECOVERY_FILE_DEST_SIZE SQL> altersystem setDB_RECOVERY_FILE_DEST_SIZE=20G scope=both; System altered.SQL> show parameter db_recoveryNAMETYPE VALUE------------------------------------ ----------- ------------------------------db_recovery_file_dest stringdb_recovery_file_dest_size big integer20G 9. 设置DB_RECOVERY_FILE_DEST SQL> altersystem setdb_recovery_file_dest="/opt/oracle/fast_recovery_area"scope=both;System altered. 10. 启用闪回日志,即闪回数据库功能 SQL> alterdatabaseflashback on; Databasealtered. 此时可以在"db_recovery_file_dest"设定的目录中看到扩展名为.flb的文件,它们就是闪回日志。 $ lso1_mf_98mpkdl6_.flb o1_mf_98okkcs9_.flb 11. 闪存日志的保存期限由参数db_flashback_ retention_target控制(单位为分钟),凡是超出保存期限的闪回日志将会在快速恢复区空间吃紧时被自动删除。 SQL> show parameter db_flashback_retention_targetNAMETYPE VALUE------------------------------------ ----------- ------------------------------db_flashback_retention_target integer10080 Oracle 11g Flashback Data Archive(闪回数据归档) http://www.linuxidc.com/Linux/2013-06/86696.htm Oracle Flashback闪回机制 http://www.linuxidc.com/Linux/2013-05/84223.htm Oracle Flashback database http://www.linuxidc.com/Linux/2013-05/84129.htm Flashback table快速恢复误删除的数据 http://www.linuxidc.com/Linux/2012-09/70988.htm Oracle 备份恢复:Flashback闪回 http://www.linuxidc.com/Linux/2012-09/69958.htm 更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12本文永久更新链接地址