ORA-38706: Cannot turn on FLASHBACK DATABASE logging.
来源:互联网 发布:哪里招淘宝主播 编辑:程序博客网 时间:2024/05/29 14:45
今天在研究flashback的时候碰到了个小问题,无法开启flashback功能,报错:ORA-38706和ORA-38714
步骤如下:
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination use_recovery_file_dest
Oldest online log sequence 7
Next log sequence to archive 9
Current log sequence 9
SQL> select log_mode,flashback_on from v$database;
LOG_MODE FLASHBACK_ON
------------ ------------------
ARCHIVELOG NO
如果没有开启归档,必须在mount状态下执行:
SQL> alter database archivelog;
否则是无法开启flashback的,因为闪回需要归档
SQL> select open_mode from v$database;
OPEN_MODE
----------
MOUNTED
SQL> alter database flashback on;
alter database flashback on
*
ERROR at line 1:
ORA-38706: Cannot turn on FLASHBACK DATABASE logging.
ORA-38714: Instance recovery required.
在网上google了一下,没找到什么有用的信息,别人出现这个情况是因为归档没有开启,但是我已经开启归档了
查看alert.log文件,也没什么信息,只报了一条:
Wed Aug 21 00:15:20 2013
alter database flashback on
ORA-38706 signalled during: alter database flashback on...
SQL> recover database;
Media recovery complete.
SQL> alter database flashback on;
alter database flashback on
*
ERROR at line 1:
ORA-38706: Cannot turn on FLASHBACK DATABASE logging.
ORA-38714: Instance recovery required.
仍然不行,于是从错误代码编号着手,看看有什么有价值的信息
[oracle@RHEL5U3 ~]$ oerr ora 38706
38706, 00000, "Cannot turn on FLASHBACK DATABASE logging."
// *Cause: An ALTER DATABASE FLASHBACK ON command failed.
// Other messages in the alert log describe the problem.
// *Action: Fix the problem and retry.
这个等于没说,alert.log里没有什么内容
[oracle@RHEL5U3 ~]$ oerr ora 38714
38714, 00000, "Instance recovery required."
// *Cause: An ALTER DATABASE FLASHBACK ON command failed because the
// database either crashed or was shutdown with the ABORT
// option.
// *Action: Open the database and then enter the SHUTDOWN command with the
// NORMAL or IMMEDIATE option.
哇,亮点来了,看到没有,cause里写得很清楚,由于数据库crash或shutdown abort
action也写明了解决方法,只要open以后,再正常关闭数据库就行了,多简单
SQL> alter database open;
Database altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1218992 bytes
Variable Size 67110480 bytes
Database Buffers 213909504 bytes
Redo Buffers 2973696 bytes
Database mounted.
SQL> alter database flashback on;
Database altered.
flashback开启成功,验证一下:
SQL> select log_mode,flashback_on from v$database;
LOG_MODE FLASHBACK_ON
------------ ------------------
ARCHIVELOG YES
总结:出现错误要根据错误提示去一步步解决问题,首先当然是查看alert.log,看是否存在有价值的提示,如果没有,那么就要从ORA-xxxxx 错误本身来查找问题了,如果google不到好的解决方案也不要气馁,我们还有oracle提供的oerr命令,非常之好用,有时候使用它会给你带来意外惊喜哦
-------------------------------------------------------------------------------------------------------
By aaron8219 Chinaunix Blog:http://blog.chinaunix.net/uid/24612962.html
原创内容,转载请注明链接,谢谢!
http://blog.csdn.net/aaron8219/article/details/10129503
- ORA-38706: Cannot turn on FLASHBACK DATABASE logging.
- ORA-38706: Cannot turn on FLASHBACK DATABASE logging.
- ORA-38706: Cannot turn on FLASHBACK DATABASE logging.ORA-38709: Recovery Area is not enabled.
- ORA-38706: Cannot turn on FLASHBACK DATABASE logging.ORA-38709: Recovery Area is not enabled.
- ORA-38760: This database instance failed to turn on flashback database
- ORA-38760: This database instance failed to turn on flashback database 错误解决过程
- ORA-38760: This database instance failed to turn on flashback database
- STARTUP Database failed ORA-38760 to turn on Flashback Database (Doc ID 1554596.1)
- ORA-38760: This database instance failed to turn on flashback database
- ORA-38760: This database instance failed to turn on flashback database 第三篇
- ORA-38760: This database instance failed to turn on flashback database
- ORA-38760: This database instance failed to turn on flashback database
- ORA-38760: This database instance failed to turn on flashback database
- OORA-38760: This database instance failed to turn on flashback database
- Turn on WCF Server Security Event Logging & Auditing
- flashback之flashback database
- ORA-01157报错"cannot identify/lock data file" ORA-01219:database not open:queries allowed on fixed
- Flashback Database!
- 其实,成功离我们并不远!
- Eclipse 平台进行 C/C++ 开发
- POJ 2060
- js中string转换为date,一句话即转!
- 【SSH学习笔记】整合spring3-struts2的小项目(四)
- ORA-38706: Cannot turn on FLASHBACK DATABASE logging.
- memcached命令行参数说明
- 错过一个不爱你的人,是为了等待一个爱你的人。
- 为了你网站有一个好的排名,请不要用模板站来建站!
- java_泛型方法使用实例
- HDU 1278 漂亮面料的设计(超级模拟)
- strcpy strcat等相关函数的实现
- 2013多校九1003-HDU4688-DP+计算几何
- Eclipse Python插件安装