文章详情

短信预约-IT技能 免费直播动态提醒

请输入下面的图形验证码

提交验证

短信预约提醒成功

ORA-38760: This database instance failed to turn on flashback database

2024-04-02 19:55

关注

昨晚学习ORACLE用HR用户执行:create table reg_copy as select * from regions;居然一片空白没有任何反应,不想强行退出,于是用ORACLE用户来终止会话的方式来处理,先后用了三种方式:

第一种:select sid,serial# from v$session where username='HR';

         然后用:ALTER SYSTEM KILL SESSION 'sid,serial#' IMMEDIATE。

第二种:ALTER SYSTEM DISCONNECT SESSION 'sid,serial#' IMMEDIATE

第三种:用以下命令查到系统级别的进程号,然后杀掉。

SET LINESIZE 100
COLUMN spid FORMAT A10
COLUMN username FORMAT A10
COLUMN program FORMAT A45
 
SELECT s.inst_id,
       s.sid,
       s.serial#,
       p.spid,
       s.username,
       s.program
FROM   gv$session s
       JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id
WHERE  s.type != 'BACKGROUND';

结果今天起来起动数据库就有如下提示了:

SQL> startup
ORACLE instance started.
Total System Global Area 1536602112 bytes
Fixed Size            2213616 bytes
Variable Size          956303632 bytes
Database Buffers      570425344 bytes
Redo Buffers            7659520 bytes
Database mounted.
ORA-38760: This database instance failed to turn on flashback database

不知跟昨天的事有没有关系,先记录下来。晚些做实现进一步验证。先记录处理此故障的步骤。

SQL> shutdown immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 1536602112 bytes
Fixed Size            2213616 bytes
Variable Size          956303632 bytes
Database Buffers      570425344 bytes
Redo Buffers            7659520 bytes
Database mounted.
ORA-38760: This database instance failed to turn on flashback database


SQL> alter database flashback on;
alter database flashback on
*
ERROR at line 1:
ORA-38706: Cannot turn on FLASHBACK DATABASE logging.
ORA-38713: Flashback Database logging is already turned on.


SQL> alter database flashback off;

Database altered.

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.


SQL> alter database flashback off;

Database altered.

SQL> shutdown immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.

Total System Global Area 1536602112 bytes
Fixed Size            2213616 bytes
Variable Size          956303632 bytes
Database Buffers      570425344 bytes
Redo Buffers            7659520 bytes
Database 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.

SQL>  select FLASHBACK_ON from v$database;

FLASHBACK_ON
------------------
RESTORE POINT ONLY

SQL> alter database force logging;

Database altered.

SQL> alter database flashback off;

Database altered.

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-38760: This database instance failed to turn on flashback database


SQL> shutdown immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.

Total System Global Area 1536602112 bytes
Fixed Size            2213616 bytes
Variable Size          956303632 bytes
Database Buffers      570425344 bytes
Redo Buffers            7659520 bytes
Database mounted.
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-38760: This database instance failed to turn on flashback database


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.

SQL> recover database;
ORA-00283: recovery session canceled due to errors
ORA-38760: This database instance failed to turn on flashback database

参考大牛的文章,说是跟还原点有关系。
SQL> col name for a30
SQL> /

NAME                   TO_CHAR(TIME,'YYYY/ GUA
------------------------------ ------------------- ---
B1                   2016/06/06 23:03:58 YES

SQL> alter database flashback off;

Database altered.

SQL> select flashback_on from v$database;

FLASHBACK_ON
------------------
RESTORE POINT ONLY

SQL> drop restore point b1;

Restore point dropped.

SQL> select flashback_on from v$database;

FLASHBACK_ON
------------------
NO

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.


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.


SQL> recover database;
ORA-00283: recovery session canceled due to errors
ORA-00264: no recovery required


SQL> shutdown immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.

Total System Global Area 1536602112 bytes
Fixed Size            2213616 bytes
Variable Size          956303632 bytes
Database Buffers      570425344 bytes
Redo Buffers            7659520 bytes
Database 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.


SQL> recover database;
ORA-00283: recovery session canceled due to errors
ORA-00264: no recovery required

SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01139: RESETLOGS option only valid after an incomplete database recovery


SQL> alter database open;

Database altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 1536602112 bytes
Fixed Size            2213616 bytes
Variable Size          956303632 bytes
Database Buffers      570425344 bytes
Redo Buffers            7659520 bytes
Database mounted.
Database opened.
SQL> select flashback_on,log_mode from v$database;

FLASHBACK_ON       LOG_MODE
------------------ ------------
NO           ARCHIVELOG

SQL> alter database flashback on;

Database altered.
SQL> select flashback_on,log_mode from v$database;

FLASHBACK_ON       LOG_MODE
------------------ ------------
YES           ARCHIVELOG

结论:

应该是由于数据库非一致性关闭导致的38760错误,如果重启flashback都报错38714,就删除还原点后,再重启数据库,可以正常启动了。以后还是正常关机保险。

参考:http://blog.csdn.net/aaron8219/article/details/10129503

http://blog.chinaunix.net/uid-22948773-id-2821820.html


阅读原文内容投诉

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

软考中级精品资料免费领

  • 历年真题答案解析
  • 备考技巧名师总结
  • 高频考点精准押题
  • 2024年上半年信息系统项目管理师第二批次真题及答案解析(完整版)

    难度     813人已做
    查看
  • 【考后总结】2024年5月26日信息系统项目管理师第2批次考情分析

    难度     354人已做
    查看
  • 【考后总结】2024年5月25日信息系统项目管理师第1批次考情分析

    难度     318人已做
    查看
  • 2024年上半年软考高项第一、二批次真题考点汇总(完整版)

    难度     435人已做
    查看
  • 2024年上半年系统架构设计师考试综合知识真题

    难度     224人已做
    查看

相关文章

发现更多好内容

猜你喜欢

AI推送时光机
位置:首页-资讯-数据库
咦!没有更多了?去看看其它编程学习网 内容吧
首页课程
资料下载
问答资讯