Enabling achivelog mode in 12c RAC database
Below is the step-by-step procedure to enable ARCHIVELOG mode in an Oracle 12c RAC database. This process ensures that your database can perform point-in-time recoveries and maintain a high level of data protection.
Initial Status Check and Database Shutdown
Before making architectural changes, verify the current state of your RAC instances across all nodes.
[oracle@testsrv1 ~]$ srvctl status database -d MYTESTDB Instance MYTESTDB1 is running on node testsrv1 Instance MYTESTDB2 is running on node testsrv2
Stopping the Database Instances
To change the archiving mode, the database must be in a mounted state but not open. Begin by shutting down all instances in the cluster.
[oracle@testsrv1 ~]$ srvctl stop database -d MYTESTDB [oracle@testsrv1 ~]$ srvctl status database -d MYTESTDB Instance MYTESTDB1 is not running on node testsrv1 Instance MYTESTDB2 is not running on node testsrv2
Starting the Database in Mount Mode
In a RAC environment, you can use srvctl to bring all instances into the MOUNT state simultaneously.
[oracle@testsrv1 ~]$ srvctl start database -d MYTESTDB -o mount [oracle@testsrv1 ~]$ srvctl status database -d MYTESTDB Instance MYTESTDB1 is running on node testsrv1 Instance MYTESTDB2 is running on node testsrv2
Verifying Instance Status via SQL*Plus
Connect to the local instance to verify that all cluster members are correctly mounted.
[oracle@testsrv1 ~]$ sqlplus '/ as sysdba' SQL*Plus: Release 12.1.0.2.0 Production on Fri Oct 14 00:10:28 2016 Copyright (c) 1982, 2014, Oracle. All rights reserved. SQL> select instance_name,status from gv$instance; INSTANCE_NAME STATUS ---------------- ------------ MYTESTDB1 MOUNTED MYTESTDB2 MOUNTED
Enabling ARCHIVELOG Mode
Now that the instances are mounted, you can check the current log mode and execute the conversion.
SQL> archive log list; Database log mode No Archive Mode Automatic archival Disabled Archive destination /u01/app/oracle/product/12.1.0.2/dbhome_1/dbs/arch Oldest online log sequence 32 Current log sequence 33 SQL> alter database archivelog; Database altered.
Configuring the Archive Destination (FRA)
It is best practice to point your archive logs to a shared area, such as the Fast Recovery Area (FRA) on ASM, so all RAC nodes can access them.
SQL> alter system set log_archive_dest_1='LOCATION=+FRA' SCOPE=SPFILE; SQL> exit
Final Restart and Verification
To complete the process, shut down the mounted instances and perform a clean start to open the database
[oracle@testsrv1 ~]$ srvctl stop database -d MYTESTDB [oracle@testsrv1 ~]$ srvctl start database -d MYTESTDB
Confirming the New Configuration
Finally, log back in to ensure that automatic archival is enabled and pointing to the correct destination.
[oracle@testsrv1 ~]$ sqlplus '/ as sysdba' SQL> archive log list; Database log mode Archive Mode Automatic archival Enabled Archive destination +FRA Oldest online log sequence 33 Next log sequence to archive 34 Current log sequence 34
Oracle Database Consulting Services
Ready to optimize your Oracle Database for the future?
Share this
Share this
More resources
Learn more about Pythian by reading the following blogs and articles.
Oracle Database 12c: Network Recovery in RMAN
Create 19c Database in Archive Mode Using DBCA Silent
12c: How to Restore/Recover a Small Table in a Large Database
Ready to unlock value from your data?
With Pythian, you can accomplish your data transformation goals and more.