症状:

我打开后归档命令报告运行错误ORA-00265

    SQL> alter database archivelog;
alter database archivelog
*
ERROR at line 1:
ORA-00265: instance recovery required, cannot set ARCHIVELOG mode

问题分析:

     从如上错误我们能够看到是由于datafile,controlfile,redolog中的SCN号不一致导致无法开启归档,那么导致该问题的解决办法是由于我重新启动数据库到mount的时候採用的是startup force mount;由于这个命令实际上是做了两步操作。分别例如以下:

1、shutdown abort    ---强制关闭数据库

2、startup mount




      既然我们隐含的做了shutdown abort操作之后。也就意味着datafile。controlfile。redolog这里面的SCN号肯定不一致,须要在open数据库的过程中做recover,因为他们的SCN号不一致,所以会导致无法在mount状态下开启archivelog,例如以下:

    SQL> startup mount force;
ORACLE instance started. Total System Global Area 2505338880 bytes
Fixed Size 2255832 bytes
Variable Size 620758056 bytes
Database Buffers 1862270976 bytes
Redo Buffers 20054016 bytes
Database mounted. SQL> alter database archivelog;
alter database archivelog
*
ERROR at line 1:
ORA-00265: instance recovery required, cannot set ARCHIVELOG mode

问题解决的方法:

针对该问题。最简单的解决的方法是,将数据库open,这个时候会进行recover操作。完毕之后再进行shutdown immediate后启动到statup mount就能够开启归档了。具体见例如以下:

    SQL> alter database open;

    Database altered.

    ####recover日志信息例如以下
alter database open
Beginning crash recovery of 1 threads
parallel recovery started with 3 processes
Started redo scan
Completed redo scan
read 1522 KB redo, 175 data blocks need recovery
Started redo application at
Thread 1: logseq 7, block 10941
Recovery of Online Redo Log: Thread 1 Group 1 Seq 7 Reading mem 0
Mem# 0: /DBData/woo2/redo01.log
Completed redo application of 0.44MB
Completed crash recovery at
Thread 1: logseq 7, block 13985, scn 991198
175 data blocks read, 175 data blocks written, 1522 redo k-bytes read
Wed Sep 03 22:39:35 2014
Thread 1 advanced to log sequence 8 (thread open)
Thread 1 opened at log sequence 8
Current log# 2 seq# 8 mem# 0: /DBData/woo2/redo02.log
Successful open of redo thread 1
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Wed Sep 03 22:39:35 2014
SMON: enabling cache recovery
[13499] Successfully onlined Undo Tablespace 2.
Undo initialization finished serial:0 start:3565124 end:3565194 diff:70 (0 seconds)
Verifying file header compatibility for 11g tablespace encryption..
Verifying 11g file header compatibility for tablespace encryption completed
SMON: enabling tx recovery
Database Characterset is AL32UTF8
No Resource Manager plan active
replication_dependency_tracking turned off (no async multimaster replication found)
Starting background process QMNC
Wed Sep 03 22:39:36 2014
QMNC started with pid=23, OS id=16119
Completed: alter database open
Wed Sep 03 22:39:37 2014
db_recovery_file_dest_size of 4182 MB is 0.00% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
Wed Sep 03 22:39:37 2014
Starting background process CJQ0
Wed Sep 03 22:39:37 2014
CJQ0 started with pid=24, OS id=16134
Starting background process SMCO
Wed Sep 03 22:39:43 2014
SMCO started with pid=30, OS id=16149

#####immediate关闭数据库,又一次开启归档,就可以。

    SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started. Total System Global Area 2505338880 bytes
Fixed Size 2255832 bytes
Variable Size 620758056 bytes
Database Buffers 1862270976 bytes
Redo Buffers 20054016 bytes
Database mounted.
SQL> alter database archivelog; Database altered. SQL> alter database open; Database altered. SQL> ###打开归档alert日志信息例如以下
ALTER DATABASE MOUNT
Successful mount of redo thread 1, with mount id 3606990310
Database mounted in Exclusive Mode
Lost write protection disabled
Completed: ALTER DATABASE MOUNT
Wed Sep 03 22:45:06 2014
alter database archivelog
Completed: alter database archivelog
alter database open
Wed Sep 03 22:45:12 2014
LGWR: STARTING ARCH PROCESSES
Wed Sep 03 22:45:12 2014
ARC0 started with pid=20, OS id=16867
ARC0: Archival started
LGWR: STARTING ARCH PROCESSES COMPLETE
ARC0: STARTING ARCH PROCESSES
Wed Sep 03 22:45:13 2014
ARC1 started with pid=21, OS id=16871
Wed Sep 03 22:45:13 2014
ARC2 started with pid=22, OS id=16873
Wed Sep 03 22:45:13 2014
ARC3 started with pid=23, OS id=16875
ARC1: Archival started
ARC2: Archival started
ARC1: Becoming the \

版权声明:本文博客原创文章。博客,未经同意,不得转载。

ORA-00265: instance recovery required, cannot set ARCHIVELOG mode的更多相关文章

  1. 【小错误】ORA-00265: instance recovery required, cannot set ARCHIVELOG mode

    1.错误描述:今天在起归档的时候报一下错误: SQL> alter database archivelog; alter database archivelog * ERROR at line ...

  2. 【小错误】起归档是遇到ORA-00265: instance recovery required, cannot set ARCHIVELOG mode

    今天在起归档时遇到ORA-00265: instance recovery required, cannot set ARCHIVELOG mode的错误 从错误我们能够看到是由于datafile,c ...

  3. ORA-00265: instance recovery required, cannot set ARCHIVELOG

    OS: Oracle Linux Server release 5.7 DB: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - ...

  4. An AnnotationConfiguration instance is required to use

    An AnnotationConfiguration instance is required to use <mapping class="jebe7282/study/hibern ...

  5. 物理DG主备库切换时遇到ORA-16139: media recovery required错误

    在物理DG主备库切换时遇到ORA-16139: media recovery required错误 SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRI ...

  6. 整合SSH三大框架用注解时报An AnnotationConfiguration instance is required to use

    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 's ...

  7. org.hibernate.MappingException: An AnnotationConfiguration instance is required to use <mapping clas

    在Hibernate中使用annotation出现错误.如题目所示. HibernateSessionFactory类中: //    private  static Configuration co ...

  8. SMON进程、PMON进程、LGWR/ARCH

    SMON 进程:system monitor instance monitor 系统监控.实例监控进程 说明及作用:在实例关闭时,会清理临时段,整理空闲空间free space; 实例非正常关闭后,启 ...

  9. Oracle corrupt block(坏块) 详解

    转自:http://blog.csdn.net/tianlesoftware/article/details/5024966 一. 坏块说明 1.1 相关链接 在看坏块之前,先看几个相关的链接,在后面 ...

随机推荐

  1. java线程中的sleep和wait区别

                                                                            面试题:java线程中sleep和wait的区别以及其资 ...

  2. myeclipse中间classpath

    myeclipse中间classpath这是一个非常重要的问题 myeclipse是搜索寻找在按照时间其,和myeclipse有一个特殊的文件来保存classpath信息.这也是别人的项目文件的副本时 ...

  3. teamfoundationserver2010之使用vs2010&&vs2013创建修改签入签出提交代码等操作

    好久之前就在个人的电脑上装了vs2013,看到原生支持html5和css3,前端开发还是挺不错的 而公司开发一直用着vs2010,真是羡慕嫉妒恨啊... 于是乎就有了今天的测试 使用工具 teamfo ...

  4. SQL开发中容易忽视的一些小地方(二)

    原文:SQL开发中容易忽视的一些小地方(二) 目的:继上一篇:SQL开发中容易忽视的一些小地方(一) 总结SQL中的null用法后,本文我将说说表联接查询. 为了说明问题,我创建了两个表,分别是学生信 ...

  5. 网络请求 http get post 一

    Http 定义了与server交互的不同方法.最主要的方法有4种.各自是Get POST PUT DELETE ,URL 全称资源描写叙述符,我们能够这样觉得一个URL地址,一个URL地址,它用于描写 ...

  6. Balanced Binary Tree(Java代码没有结束,是什么原因???)

    Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary ...

  7. 一个人ACM(我们赶上了ACM)

    时间过得真快,不经意间我已经花了两年的大学生活,现在是时候写的东西.纪念馆两年左右的时间,最近一直在玩博客.我写了一个博客.纪念我们终将逝去的青春. 就从报考说起吧.高考成绩一般,自己选择了土建类的学 ...

  8. Arrays.asList的那点事

    import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.List ...

  9. leetcode 之 Unique Paths

    Unique Paths A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagra ...

  10. js中,(function(){})()的用法解析

    (function($){...})(jQuery)  含义 经常用,今天总结一下,下文摘自某网友的总结: (function($){...})(jQuery)实际上是匿名函数,不懂得朋友可以继续往下 ...