Enabling ARCHIVELOG in Oracle RAC environment.
Below verification reveals that our current RAC cluster database is in NOARCHIVE LOG mode.
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 4
Current log sequence 5
Step 1 - Shut-down the database across the nodes from any node in the cluster using below command.
-bash-3.2$ srvctl stop database -d ractst -o immediate
Let's verify if database instances are down across the cluster nodes.
-bash-3.2$ srvctl status database -d ractst
Instance ractst1 is not running on node rac1
Instance ractst2 is not running on node rac2
Step 2 - Mount the database instances using below command.
-bash-3.2$ srvctl start database -d ractst -o mount
Instances are started now - in Mount state.
-bash-3.2$ srvctl status database -d ractst
Instance ractst1 is running on node rac1
Instance ractst2 is running on node rac2
Note : - Before Oracle 11g R2, we used to disable the INIT parameter cluster_database in order to enable and disable archiving in RAC environment.
Step 3 - Enable the archiving now.
-bash-3.2$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.1.0 Production on Fri Jun 3 13:00:52 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
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 4
Next log sequence to archive 5
Current log sequence 5
Also open the database at 2nd node and check archiving status as below.
SQL> alter database open;
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 2
Next log sequence to archive 3
Current log sequence 3
That's it...Hope it would help someone....
No comments:
Post a Comment