ORA-00265: instance recovery required, cannot set ARCHIVELOG mode

问题现象:

我在执行开启归档命令后报错误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
时间: 2024-10-01 00:42:17

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

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

今天在起归档时遇到ORA-00265: instance recovery required, cannot set ARCHIVELOG mode的错误 从错误我们能够看到是由于datafile,controlfile,redolog中的SCN号不一致导致无法开启归档,那么导致该问题的解决办法是由于我重新启动数据库到mount的时候采用的是startup force mount;由于这个命令实际上是做了两步操作.分别例如以下:1.shutdown abort    ---强制关闭数据库2.st

启动归档时提示:ORA-00265: instance recovery required, cannot set ARCHIVELOG mode

故障现象: 将数据库修改为归档模式时,有如下的提示: SQL> alter database archivelog; alter database archivelog * ERROR at line 1: ORA-00265: instance recovery required, cannot set ARCHIVELOG mode 原因分析: 将数据库关闭使用了, shutdown abort或者startup force mount等非一致性关闭,导致数据库 数据文件,控制文件,日志文件

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

1.错误描述:今天在起归档的时候报一下错误: SQL> alter database archivelog; alter database archivelog * ERROR at line 1: ORA-00265: instance recovery required, cannot set ARCHIVELOG mode 2.从错误上看到是由于三大文件(datafile,controlfile,logfile)的scn不一致导致,造成scn不一致的原因是我们用了shutdown abor

『ORACLE』修改归档时报错:instance recovery required, cannot set ARCHIVELOG mode

SQL> alter database archivelog;alter database archivelog*ERROR at line 1:ORA-00265: instance recovery required, cannot set ARCHIVELOG mode 正常关库.启库使数据库一致性关闭 SQL>shutdown immediate SQL>startup 在关库.启动到mount状态 SQL>shutdown immediate SQL>startup

An AnnotationConfiguration instance is required to use

An AnnotationConfiguration instance is required to use <mapping class="jebe7282/study/hibernate/Classes.hbm.xml"/> 这个是mapping 标签配置属性问题class 应该 改为<mapping resource="jebe7282/study/hibernate/Classes.hbm.xml"/>

ORA_ERROR大全

转自:http://blog.csdn.net/haiross/article/details/12839229 常见错误:-60 ORA00060: deadlock detected while waiting for resource 一般错误:  - 1 ORA00001: unique constraint (.) violated  -17 ORA00017: session requested to set trace event  -18 ORA00018: maximum nu

OCP第三章:数据库后台进程

SMON系统监控进程 作用:实例的恢复 --> 1.前滚所有重做日志中的改变 2.打开数据库为了用户能够访问 3.回滚没有提交的事物 --> 实例恢复不需要DBA操作,由oracle自动完成 --> 在执行startup force命令后,会进行实例恢复操作 --> 相关命令: alter database archivelog; shutdown mount shutdown immediate startup mount --> 遇到报错:ERROR at line 1:

SMON进程、PMON进程、LGWR/ARCH

SMON 进程:system monitor instance monitor 系统监控.实例监控进程 说明及作用:在实例关闭时,会清理临时段,整理空闲空间free space; 实例非正常关闭后,启动实例时,做instance recovery : SMON如何判断是否需要实例恢复: --在数据库mount状态,可以通过last_change#是否未Null; select name,checkpoint_change#,last_change# from v$datafile; --数据库在

Oracle数据库报错:ORA-00265

SQL> alter database archivelog;alter database archivelog*ERROR at line 1:ORA-00265: instance recovery required, cannot set ARCHIVELOG mode --实例错误,需要先打开数据库,让数据文件.控制文件.redo log日志同步后再切换归档SQL> alter database open; Database altered. SQL> shutdown imme