Most probably you did a shutdown abort in order to speed up the bounce process 🙂 so you can set your database into archivelog mode.
Below, you can find an example of how one can reproduce this error:
[oracle@node1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Wed Dec 22 07:37:51 2021
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination /u01/app/oracle/product/19.0.0/dbhome_1/dbs/arch
Oldest online log sequence 28
Current log sequence 30
SQL> startup mount force;
ORACLE instance started.
Total System Global Area 1207955592 bytes
Fixed Size 9134216 bytes
Variable Size 335544320 bytes
Database Buffers 855638016 bytes
Redo Buffers 7639040 bytes
Database mounted.
SQL> alter database archivelog;
alter database archivelog
*
ERROR at line 1:
ORA-00265: instance recovery required, cannot set ARCHIVELOG mode
The solution is an easy one. All you have to do is to bring you database in OPEN mode and perform a “clean” shutdown:
SQL> alter database open;
Database altered.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 PDB1 READ WRITE NO
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 1207955592 bytes
Fixed Size 9134216 bytes
Variable Size 335544320 bytes
Database Buffers 855638016 bytes
Redo Buffers 7639040 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle/product/19.0.0/dbhome_1/dbs/arch
Oldest online log sequence 29
Next log sequence to archive 31
Current log sequence 31
SQL>