In this post, we’ll cover everything you need to know about how to enable archive log mode in Oracle RAC.
Let’s open our 2-node Oracle RAC(node1 and node2) VirtualBox and get started!
Table of Contents
Step 1) Check all the instance status in RAC cluster:
[root@node1 ~]# sudo su - oracle
Last login: Thu Jun 13 00:27:32 IST 2024 on pts/1
[oracle@node1 ~]$ ps -ef|grep pmon
grid 5250 1 0 22:02 ? 00:00:00 asm_pmon_+ASM1
oracle 5839 1 0 22:02 ? 00:00:00 ora_pmon_racdb1
oracle 8128 8076 0 22:07 pts/0 00:00:00 grep --color=auto pmon
[oracle@node1 ~]$ . oraenv
ORACLE_SID = [racdb1] ? racdb1
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@node1 ~]$ srvctl status database -d racdb
Instance racdb1 is running on node node1
Instance racdb2 is running on node node2
Step 2) Login as sysdba and check the LOG_MODE:
[oracle@node1 ~]$ sqlplus "/as sysdba"
SQL*Plus: Release 19.0.0.0.0 - Production on Tue Jul 23 22:08:19 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> select log_mode,name from v$database;
LOG_MODE NAME
------------ ---------
NOARCHIVELOG RACDB
OR,
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination /u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch
Oldest online log sequence 15
Current log sequence 16
Step 3) Stop all the instances of RAC:
[oracle@node1 ~]$ srvctl stop database -d racdb
[oracle@node1 ~]$ srvctl status database -d racdb
Instance racdb1 is not running on node node1
Instance racdb2 is not running on node node2
Step 4) Start only one instance in mount mode/state:
[oracle@node1 ~]$ srvctl start instance -d racdb -i racdb1 -o mount
Step 5) Login to the above started instance and enable archive log mode in oracle RAC:
[oracle@node1 ~]$ sqlplus "/as sysdba"
SQL*Plus: Release 19.0.0.0.0 - Production on Wed Jul 24 01:35:03 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> alter database archivelog;
Database altered.
Step 6) Open the logged in instance:
SQL> alter database open;
Database altered.
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@node1 ~]$
Step 7) Start all the remaining instances:
[oracle@node1 ~]$ srvctl status database -d racdb
Instance racdb1 is running on node node1
Instance racdb2 is not running on node node2
[oracle@node1 ~]$ srvctl start database -d racdb
[oracle@node1 ~]$ srvctl status database -d racdb
Instance racdb1 is running on node node1
Instance racdb2 is running on node node2
Step 8) Verify the archive log mode:
SQL> select log_mode,name from v$database;
LOG_MODE NAME
------------ ---------
ARCHIVELOG RACDB
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle/product/19.3.0/dbhome_1/dbs/arch
Oldest online log sequence 17
Next log sequence to archive 18
Current log sequence 18
I hope you found this article helpful in enabling archive log mode in oracle RAC. Feel free to reach out if you have any questions. You can check the related article Disable archive log mode in Oracle RAC.