DBA Hub

📋Steps in this guide1/8

Archivelog Mode On RAC

The differences between resetting the archive log mode on a single node instance and a Real Application Cluster (RAC).

oracle racconfigurationintermediate
by OracleDba
14 views
1

Oracle 9i

On a single node 9i instance the archive log mode is reset as follows.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
ALTER SYSTEM SET log_archive_start=TRUE SCOPE=spfile;
ALTER SYSTEM SET log_archive_dest_1='location=/u01/oradata/MYSID/archive/' SCOPE=spfile;
ALTER SYSTEM SET log_archive_format='arch_%t_%s.arc' SCOPE=spfile;

SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
ARCHIVE LOG START;
ALTER DATABASE ARCHIVELOG;
ALTER DATABASE OPEN;
2

Oracle 10g Upward

In Oracle 10g the parameter and command have been deprecated, so you will use the following code.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
ALTER SYSTEM SET log_archive_dest_1='location=/u01/oradata/MYSID/archive/' SCOPE=spfile;
ALTER SYSTEM SET log_archive_format='arch_%t_%s_%r.arc' SCOPE=spfile;

SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
ALTER DATABASE ARCHIVELOG;
ALTER DATABASE OPEN;
3

Real Application Clusters (RAC)

The command can only be performed if the database in mounted in exclusive mode. This means the whole clustered database must be stopped before the operation can be performed.
4

Oracle 9i

First we set the relevant archive parameters. Since we need to mount the database in exclusive mode we must also alter the following parameter. From the command line we can stop the entire clustered database using the following. With the cluster down we can connect to a single node and issue the following commands. Notice that the parameter has been reset to it's original value. Since the datafiles and spfile are shared between all instances this operation only has to be done from a single node. From the command line we can now start the clustered database again using the following. The current settings place all archive logs in the same directory. This is acceptable since the thread (%t) is part of the archive format preventing any name conflicts between instances. If node-specific locations are required the parameter can be repeated for each instance with the relevant SID prefix.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
ALTER SYSTEM SET log_archive_start=TRUE SCOPE=spfile;
ALTER SYSTEM SET log_archive_dest_1='location=/u01/oradata/MYDB/archive/' SCOPE=spfile;
ALTER SYSTEM SET log_archive_format='arch_%t_%s.arc' SCOPE=spfile;

ALTER SYSTEM SET cluster_database=FALSE SCOPE=spfile;

$ srvctl stop database -d MYDB

STARTUP MOUNT;
ARCHIVE LOG START;
ALTER DATABASE ARCHIVELOG;
ALTER SYSTEM SET cluster_database=TRUE SCOPE=spfile;
SHUTDOWN IMMEDIATE;

$ srvctl start database -d MYDB
5

Oracle 10gR1

If the parameters are not set, the archived redo logs will be placed in the FRA. If you want to specify their location and the file name format manually, you can do it as follows. Since we need to mount the database in exclusive mode we must also alter the following parameter. From the command line we can stop the entire clustered database using the following. With the cluster down we can connect to a single node and issue the following commands. Notice that the parameter has been reset to it's original value. Since the datafiles and spfile are shared between all instances this operation only has to be done from a single node. From the command line we can now start the clustered database again using the following. From 10gR2, you no longer need to reset the parameter during the process. If the parameters are not set, the archived redo logs will be placed in the FRA. If you want to specify their location and the file name format manually, you can do it as follows. From the command line we can stop the entire clustered database and start it in mount mode using the following. With the database mounted issue the following commands. Since the datafiles and spfile are shared between all instances this operation only has to be done from a single node. From the command line we stop and start the clustered database again using the following commands. The process is exactly the same in 11g as in the previous Oracle 10gR2 section. The process is exactly the same in 12c as in the previous Oracle 10gR2 section. For more information see: - How To Enable/Disable Archive Logging In RAC Environment for 10.2 and higher version (Doc ID 1186764.1) Hope this helps. Regards Tim...

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
ALTER SYSTEM SET log_archive_dest_1='location=/u01/oradata/MYDB/archive/' SCOPE=spfile;
ALTER SYSTEM SET log_archive_format='arch_%t_%s_%r.arc' SCOPE=spfile;

ALTER SYSTEM SET cluster_database=FALSE SCOPE=spfile;

$ srvctl stop database -d MYDB

STARTUP MOUNT;
ALTER DATABASE ARCHIVELOG;
ALTER SYSTEM SET cluster_database=TRUE SCOPE=spfile;
SHUTDOWN IMMEDIATE;

$ srvctl start database -d MYDB

ALTER SYSTEM SET log_archive_dest_1='location=/u01/oradata/MYDB/archive/' SCOPE=spfile;
ALTER SYSTEM SET log_archive_format='arch_%t_%s_%r.arc' SCOPE=spfile;

$ srvctl stop database -d MYDB
$ srvctl start database -d MYDB -o mount

sqlplus / as sysdba

ALTER DATABASE ARCHIVELOG;
EXIT;

$ srvctl stop database -d MYDB
$ srvctl start database -d MYDB
6

Oracle 10gR2

From 10gR2, you no longer need to reset the parameter during the process. If the parameters are not set, the archived redo logs will be placed in the FRA. If you want to specify their location and the file name format manually, you can do it as follows. From the command line we can stop the entire clustered database and start it in mount mode using the following. With the database mounted issue the following commands. Since the datafiles and spfile are shared between all instances this operation only has to be done from a single node. From the command line we stop and start the clustered database again using the following commands.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
ALTER SYSTEM SET log_archive_dest_1='location=/u01/oradata/MYDB/archive/' SCOPE=spfile;
ALTER SYSTEM SET log_archive_format='arch_%t_%s_%r.arc' SCOPE=spfile;

$ srvctl stop database -d MYDB
$ srvctl start database -d MYDB -o mount

sqlplus / as sysdba

ALTER DATABASE ARCHIVELOG;
EXIT;

$ srvctl stop database -d MYDB
$ srvctl start database -d MYDB
7

Oracle 11g

The process is exactly the same in 11g as in the previous Oracle 10gR2 section.
8

Oracle 12c

The process is exactly the same in 12c as in the previous Oracle 10gR2 section. For more information see: - How To Enable/Disable Archive Logging In RAC Environment for 10.2 and higher version (Doc ID 1186764.1) Hope this helps. Regards Tim...

Comments (0)

Please to add comments

No comments yet. Be the first to comment!