Thursday 23 April 2015

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

Today, I face below error while converting database into archive log mode. 
ORA-00265: instance recovery required, cannot set ARCHIVELOG mode

This error usually come when database crashed unfortunately or we shutdown database with the help of database shutdown command as: 
shutdown abort, startup force mount or shutdown abort. 
These types of command will required instance recovery in next startup. 
In short it need clean database startup.

shutdown abort
Database closed.
Database dismounted.
ORACLE instance shut down.

startup mount
ORACLE instance started.

Total System Global Area 1.0693E+10 bytes
Fixed Size                  2157504 bytes
Variable Size            5972694080 bytes
Database Buffers         4664066048 bytes
Redo Buffers               53747712 bytes
Database mounted.


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



// Solution:--

shut immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.

startup mount;
ORACLE instance started.

Total System Global Area 1.0693E+10 bytes
Fixed Size                  2157504 bytes
Variable Size            7113544768 bytes
Database Buffers         3523215360 bytes
Redo Buffers               53747712 bytes
Database mounted.

recover database;
Media recovery complete.

alter database open;
Database altered.

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

Total System Global Area 1.0693E+10 bytes
Fixed Size                  2157504 bytes
Variable Size            7147099200 bytes
Database Buffers         3489660928 bytes
Redo Buffers               53747712 bytes
Database mounted.
SQL>
SQL> alter database archivelog;

Database altered.

SQL> alter database open;

Database altered.

SQL> alter system switch logfile;

System altered.

SQL> alter system switch logfile;

System altered.