R12.2 Apps DBA. Powered by Blogger.

Enable or Disable Archive log mode in RAC

No comments :
Enable Archivelog
1)  Login to one of the nodes , verify the archive 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 200
Current log sequence 201
SQL> select name, log_mode from v$database;
NAME LOG_MODE
--------- ------------
PUB NOARCHIVELOG
2) Disable the cluster instance parameter by setting cluster_database to FALSE from the current instance:
sqlplus "/ as sysdba"
SQL> alter system set cluster_database=false scope=spfile sid='orcl1;
3) Shutdown all instances accessing the clustered database:
  srvctl stop database -d orcl
4)Using the local instance, MOUNT the database:
sqlplus "/ as sysdba"
SQL> startup mount
5) Enable archiving:
SQL> alter database archivelog;
6) Re-enable support for clustering by modifying the instance parameter cluster_database to TRUE from the current instance:
SQL> alter system set cluster_database=true scope=spfile sid='orcl1;
7) Shutdown the local instance:
SQL> shutdown immediate
8) Bring all instance back up using srvctl:
srvctl start database -d orcl
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            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     200
Next log sequence to archive  201
After enabling Archive Log Mode, each instance in the RAC configuration can automatically archive redologs.
Disable Archivelog
1) export oracle_sid=orcl1
SQL> alter system set cluster_database=false scope=spfile sid='orcl1';
System altered.
2) srvctl stop database -d orcl -o immediate
3) SQL> startup mount
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 18
Next log sequence to archive 19
Current log sequence 19
SQL> alter database noarchivelog;
Database altered.
SQL> alter system set cluster_database=true scope=spfile sid='orcl1';
System altered.
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
4) srvctl start database -d orcl
5) export oracle_sid=orcl1
sqlplus / as sysdba
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>

No comments :

Post a Comment

Note: only a member of this blog may post a comment.