小错误起归档是遇到ORA-00265: instance recovery required, cannot set ARCHIVELOG mode
Posted Tomatoes
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了小错误起归档是遇到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、startup mount
既然我们隐含的做了shutdown abort操作之后。也就意味着datafile。controlfile。redolog这里面的SCN号肯定不一致,须要在open数据库的过程中做recover,因为他们的SCN号不一致,所以会导致无法在mount状态下开启archivelog,例如以下:
SQL> alter database archivelog;
alter database archivelog
*
ERROR at line 1:
ORA-00265: instance recovery required, cannot set ARCHIVELOG mode
解决办法如下:
将数据库起到open状态,正常关闭shutdown immediate,再起到mount状态:
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 830930944 bytes
Fixed Size 2257800 bytes
Variable Size 536874104 bytes
Database Buffers 289406976 bytes
Redo Buffers 2392064 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 5
Next log sequence to archive 7
Current log sequence 7
解决,Bingo~~~~
以上是关于小错误起归档是遇到ORA-00265: instance recovery required, cannot set ARCHIVELOG mode的主要内容,如果未能解决你的问题,请参考以下文章
启动归档时提示:ORA-00265: instance recovery required, cannot set ARCHIVELOG mode
『ORACLE』修改归档时报错:instance recovery required, cannot set ARCHIVELOG mode