Wednesday, 5 October 2016
How To Enable/Disable Archive Logging In RAC Environment for 10.2 and higher version (Doc ID 1186764.1)
APPLIES TO:
Oracle Database - Enterprise Edition - Version 10.2.0.1 and laterInformation in this document applies to any platform.
GOAL
How to enable/disable database archivelog in RAC configuration?
SOLUTION
1. The following steps need to be taken to enable archive logging in a RAC database environment:
-- shutdown immediate all database instances
$ srvctl stop database -d <db_unique_name>
-- startup database in mount mode
$ srvctl start database -d <db_unique_name> -o mount
-- enable archive logging
$ sqlplus / as sysdba
sql> alter database archivelog;
sql> exit;
-- stop database
$ srvctl stop database -d <db_unique_name>
-- restart all database instances
$ srvctl start database -d <db_unique_name>
-- verify archiving is enabled/disabled by means of:
sql> archive log list;
You might need to set your log_archive_dest(_n) parameters to a shared location in each spfile, but the log_archive_start parameter does not need to be set anymore as of 10g (see Note 274302.1).
-- shutdown immediate all database instances
$ srvctl stop database -d <db_unique_name>
-- startup database in mount mode
$ srvctl start database -d <db_unique_name> -o mount
-- enable archive logging
$ sqlplus / as sysdba
sql> alter database archivelog;
sql> exit;
-- stop database
$ srvctl stop database -d <db_unique_name>
-- restart all database instances
$ srvctl start database -d <db_unique_name>
-- verify archiving is enabled/disabled by means of:
sql> archive log list;
You might need to set your log_archive_dest(_n) parameters to a shared location in each spfile, but the log_archive_start parameter does not need to be set anymore as of 10g (see Note 274302.1).
2. To disable archive logging, follow the same steps but use the NOARCHIVELOG clause of the ALTER DATABASE statement.
Please note, from 10.2 onwards, it is no longer required to modify cluster_database parameter to change archive log mode. Please refer to
Database Oracle Clusterware and Oracle Real Application Clusters Administration and Deployment Guide
What's New in Oracle Real Application Clusters Administration and Deployment?
"Changing the Archiving Mode
You no longer need to modify the
Database Oracle Clusterware and Oracle Real Application Clusters Administration and Deployment Guide
What's New in Oracle Real Application Clusters Administration and Deployment?
"Changing the Archiving Mode
You no longer need to modify the
CLUSTER_DATABASE parameter setting to change the archiving mode in Oracle RAC. You can change archive log mode as long as the database is mounted in the local instance and not open in any instances."How To Enable/Disable Archive Log Mode in Real Application Cluster Environment (Doc ID 235158.1)
APPLIES TO:
Oracle Database - Enterprise Edition - Version 9.0.1.0 to 10.1.0.5 [Release 9.0.1 to 10.1]Information in this document applies to any platform.
GOAL
The note is to provide steps to enable/disable archivelog mode in RAC environment.
SOLUTION
1. Shut down all instances.
2. Set the CLUSTER_DATABASE parameter to false on one instance in the parameter
file. If using the server parameter file, make an entry for this:
file. If using the server parameter file, make an entry for this:
*.CLUSTER_DATABASE= False
For Modifying server parameter file (SPFILE):
Alter system set cluster_database=FALSE scope=spfile sid='*';
See Document 137483.1 How to Modify the Content of a SPFILE Parameter File
3. Set the LOG_ARCHIVE_START parameter to true.
4. Set the LOG_ARCHIVE_FORMAT and make sure the parameter containing the %t parameter includes the thread number in the archived logfile name.
5. Set the cluster database wide LOG_ARCHIVE_DEST_1 parameter in the parameter file as follows:
LOG_ARCHIVE_DEST_1='LOCATION=$ORACLE_BASE/oradata/<db_name>/archive'
Note: You can multiplex the destination to up to ten locations, refer to:
Document 66433.1 Oracle8i - Multiple Archive Destinations and Remote Archival
Document 66433.1 Oracle8i - Multiple Archive Destinations and Remote Archival
To specify the archive log destinations on a per instance basis for a two-instance cluster database, for example, set the parameter as follows:
<sid1>.LOG_ARCHIVE_DEST_1='LOCATION=$ORACLE_BASE/oradata/<db_name>/archive'
<sid2>.LOG_ARCHIVE_DEST_1='LOCATION=$ORACLE_BASE/oradata/<db_name>/archive'
Archive logs can be stored on the shared disk on platforms that support CFS (Cluster File System). For more information on this see the following note: Document 183408.1 Raw Devices and Cluster Filesystems With Real Application Clusters
6. Mount the database (in exclusive mode) for the instance on which you have set CLUSTER_DATABASE to false.
7. Set the database in ARCHIVELOG mode :
SQL> ALTER DATABASE ARCHIVELOG;
8. Shutdown the instance.
SQL> SHUTDOWN IMMEDIATE;
9. Change the value of the CLUSTER_DATABASE parameter back to true.
10. Startup all instances.
To disable archive logging, follow the same steps but use the NOARCHIVELOG clause of the ALTER DATABASE statement.
Subscribe to:
Comments (Atom)