I was trying to convert my noarchivelog database to archive log, I got below error.
My database was running so I started my database in mount stage using force mount and then tried alter database archivelog, it failed with error ORA-00265
Now I tried to close database cleanly using shutdown immediate and opened in mount mode and fired command to convert to archivelog but unfortunately it failed again.
Now this time I decided to cleanly shutdown the database and open the same with startup command, to open in OPEN mode
We can see database is open, now I bought database in mount stage as its requirement to convert database archive log from noarchivelog and then I fired command to convert database in archivelog mode and finally opened database using alter database command.
So the Solution to error ORA-00265 is cleanly shutdown the database and open it in open mode and bring it in mount state normally and fire alter database archivelog.
[Also read : Switching between ARCHIVELOG Mode and NOARCHIVELOG.]
My database was running so I started my database in mount stage using force mount and then tried alter database archivelog, it failed with error ORA-00265
SQL> startup force mount
ORACLE
instance started.
Total
System Global Area 805306368 bytes
Fixed
Size 1289996
bytes
Variable
Size 218104052 bytes
Database
Buffers 583008256 bytes
Redo
Buffers 2904064 bytes
Database
mounted.
SQL>
SQL>
alter database archivelog;
alter
database archivelog
*
ERROR
at line 1:
ORA-00265:
instance recovery required, cannot set ARCHIVELOG modeNow I tried to close database cleanly using shutdown immediate and opened in mount mode and fired command to convert to archivelog but unfortunately it failed again.
SQL> shut immediate
ORA-01109:
database not open
Database
dismounted.
ORACLE
instance shut down.
SQL>
SQL>
SQL>
startup mount
ORACLE
instance started.
Total
System Global Area 805306368 bytes
Fixed
Size 1289996
bytes
Variable
Size 218104052 bytes
Database
Buffers 583008256 bytes
Redo
Buffers 2904064 bytes
Database
mounted.
SQL>
alter database archivelog;
alter
database archivelog
*
ERROR
at line 1:
ORA-00265:
instance recovery required, cannot set ARCHIVELOG mode
Now this time I decided to cleanly shutdown the database and open the same with startup command, to open in OPEN mode
SQL> shut immediate
ORA-01109:
database not open
Database
dismounted.
ORACLE
instance shut down.
SQL>
SQL>
SQL>
startup
ORACLE
instance started.
Total
System Global Area 805306368 bytes
Fixed
Size 1289996
bytes
Variable
Size 218104052 bytes
Database
Buffers 583008256 bytes
Redo
Buffers 2904064 bytes
Database
mounted.
Database
opened.
SQL>
We can see database is open, now I bought database in mount stage as its requirement to convert database archive log from noarchivelog and then I fired command to convert database in archivelog mode and finally opened database using alter database command.
SQL> shut immediate
Database
closed.
Database
dismounted.
ORACLE
instance shut down.
SQL>
SQL>
startup mount
ORACLE
instance started.
Total
System Global Area 805306368 bytes
Fixed
Size 1289996
bytes
Variable
Size 218104052 bytes
Database
Buffers 583008256 bytes
Redo
Buffers 2904064 bytes
Database
mounted.
SQL>
SQL>
alter database archivelog;
Database
altered.
SQL>
SQL>
alter database open;
Database
altered.
SQL>
SQL>
archive log list;
Database
log mode Archive Mode
Automatic
archival Enabled
Archive
destination USE_DB_RECOVERY_FILE_DEST
Oldest
online log sequence 35
Next
log sequence to archive 36
Current
log sequence 36
SQL>
So the Solution to error ORA-00265 is cleanly shutdown the database and open it in open mode and bring it in mount state normally and fire alter database archivelog.
[Also read : Switching between ARCHIVELOG Mode and NOARCHIVELOG.]