Configure the Archive Log Mode in Oracle RAC
- Connect with the any instance of Oracle RAC machine.
[oracle@host01 ~]$ ssh oracle@host01
2. Set the Environment setting on machine.
[oracle@host01 ~]$ . oraenv
ORACLE_SID = [oracle] ? orcl
The Oracle base has been set to /u01/app/oracle
[oracle@host01 ~]$
3. Check the Oracle Services running on all hosts.
[oracle@host01 ~]$ srvctl status database -db orcl
Instance orcl1 is running on node host01
Instance orcl2 is running on node host02
Instance orcl3 is running on node host03
[oracle@host01 ~]$
4. Check the Oracle database is in archive mode or not
[oracle@host01 ~]$ export ORACLE_SID=orcl1
[oracle@host01 ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Wed Jan 10 07:54:45 2024
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 USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 5
Current log sequence 6
SQL> exit
5. Stop the Oracle Database on all instance using SRVCTL command:
[oracle@host01 ~]$ srvctl stop database -db orcl
[oracle@host01 ~]$ srvctl status database -db orcl
Instance orcl1 is not running on node host01
Instance orcl2 is not running on node host02
Instance orcl3 is not running on node host03
[oracle@host01 ~]$
6. Enable the archive mode by connecting from one instance by login with SQLPLUS
[oracle@host01 ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Wed Jan 10 08:00:55 2024
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount
ORACLE instance started.
Total System Global Area 2399140616 bytes
Fixed Size 8899336 bytes
Variable Size 587202560 bytes
Database Buffers 1795162112 bytes
Redo Buffers 7876608 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 6
Current log sequence 6
SQL>
SQL>
SQL> shutdown
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
7. Start the database from srvctl command for all instances:
[oracle@host01 ~]$ srvctl start database -db orcl
[oracle@host01 ~]$
8. Check the status for all instances
[oracle@host01 ~]$ srvctl status database -db orcl
Instance orcl1 is running on node host01
Instance orcl2 is running on node host02
Instance orcl3 is running on node host03