HOW TO CHANGE NO ARCHIVE LOG MODE TO ARCHIVE LOG IN RAC
Enable Archivelog ::
1) verify the archive log mode in any one of the node
To check the archive log list you need to run the commnd " Archive log list"
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 86
Current log sequence 88
SQL> select name, log_mode from v$database;
NAME LOG_MODE
--------- ------------
ocrac NOARCHIVELOG
2) You need to disable the cluster instance parameter by setting cluster_database to FALSE from the current instance.
Pleae follow the below steps.
sqlplus "/ as sysdba"
SQL> alter system set cluster_database=false scope=spfile sid='ocrac';
3) Now you have to shutdown all instances accessing the clustered database
srvctl stop database -d ocrac
4) Using the local instance, MOUNT the database:
sqlplus "/ as sysdba"
SQL> startup mount
5) Enable archiving
SQL> alter database archivelog;
Now you have successfully enable the archivelog mode.
6) You have to re-enable the instance parameter cluster_database to TRUE from the current instance by using the following command.
SQL> alter system set cluster_database=true scope=spfile sid='ocrac';
7) You have to bounce the local instance.
SQL> shutdown immediate
8) Bring all instance back up using srvctl.
srvctl start database -d ocrac
9) Login to the local instance and verify Archive Log Mode is enabled
sqlplus "/ as sysdba"
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch
Oldest online log sequence 86
Next log sequence to archive 88
Current log sequence 89
10) After enabling Archive Log Mode, each instance in the RAC configuration can automatically archive redologs.
Disable Archivelog ::
1) set oracle_sid=ocrac
SQL> alter system set cluster_database=false scope=spfile sid='ocrac';
System altered.
2) /u01/app/grid/bin> srvctl stop database -d ocrac -o immediate
3) SQL> startup mount
Total System Global Area 2471931904 bytes
Fixed Size 2255752 bytes
Variable Size 671089784 bytes
Database Buffers 1778384896 bytes
Redo Buffers 20201472 bytes
Database mounted.
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 8
Next log sequence to archive 9
Current log sequence 9
SQL> alter database noarchivelog;
Database altered.
SQL> alter system set cluster_database=true scope=spfile sid='ocrac';
System altered.
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
4) /u01/app/grid/bin>>srvctl start database -d ocrac
5) export ORACLE_SID=ocrac
oracle@ocluster01:~| /home/oracle >sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 21 19:55:19 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL>
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 18
Current log sequence 19
SQL>
Enable Archivelog ::
1) verify the archive log mode in any one of the node
To check the archive log list you need to run the commnd " Archive log list"
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 86
Current log sequence 88
SQL> select name, log_mode from v$database;
NAME LOG_MODE
--------- ------------
ocrac NOARCHIVELOG
2) You need to disable the cluster instance parameter by setting cluster_database to FALSE from the current instance.
Pleae follow the below steps.
sqlplus "/ as sysdba"
SQL> alter system set cluster_database=false scope=spfile sid='ocrac';
3) Now you have to shutdown all instances accessing the clustered database
srvctl stop database -d ocrac
4) Using the local instance, MOUNT the database:
sqlplus "/ as sysdba"
SQL> startup mount
5) Enable archiving
SQL> alter database archivelog;
Now you have successfully enable the archivelog mode.
6) You have to re-enable the instance parameter cluster_database to TRUE from the current instance by using the following command.
SQL> alter system set cluster_database=true scope=spfile sid='ocrac';
7) You have to bounce the local instance.
SQL> shutdown immediate
8) Bring all instance back up using srvctl.
srvctl start database -d ocrac
9) Login to the local instance and verify Archive Log Mode is enabled
sqlplus "/ as sysdba"
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch
Oldest online log sequence 86
Next log sequence to archive 88
Current log sequence 89
10) After enabling Archive Log Mode, each instance in the RAC configuration can automatically archive redologs.
Disable Archivelog ::
1) set oracle_sid=ocrac
SQL> alter system set cluster_database=false scope=spfile sid='ocrac';
System altered.
2) /u01/app/grid/bin> srvctl stop database -d ocrac -o immediate
3) SQL> startup mount
Total System Global Area 2471931904 bytes
Fixed Size 2255752 bytes
Variable Size 671089784 bytes
Database Buffers 1778384896 bytes
Redo Buffers 20201472 bytes
Database mounted.
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 8
Next log sequence to archive 9
Current log sequence 9
SQL> alter database noarchivelog;
Database altered.
SQL> alter system set cluster_database=true scope=spfile sid='ocrac';
System altered.
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
4) /u01/app/grid/bin>>srvctl start database -d ocrac
5) export ORACLE_SID=ocrac
oracle@ocluster01:~| /home/oracle >sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 21 19:55:19 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL>
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 18
Current log sequence 19
SQL>