1. Connect to database
[oracle@srv1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Sun Mar 27 20:56:28 2022
Version 19.8.0.0.0
Copyright (c) 1982, 2020, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.8.0.0.0
2. Check archive log status
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 25
Current log sequence 27
SQL>
OR
SQL> select log_mode from v$database;
LOG_MODE
------------
NOARCHIVELOG
SQL>
3. Shutdown the database
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
4. Mount the database
SQL> startup mount
ORACLE instance started.
5. Enable archive log mode
SQL> alter database archivelog;
Database altered.
6. Open the database
SQL> alter database open;
Database altered.
7.Check status of archive log mode
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 25
Next log sequence to archive 27
Current log sequence 27
SQL>
OR
SQL> select log_mode from v$database;
LOG_MODE
------------
ARCHIVELOG
Archive log mode is now enabled.