prev next

Putting a RAC database in ARCHIVELOG

This is how we put a RAC database in ARCHIVELOG mode. Assuming I have a 2 node rac running in NOARCHIVELOG mode.

1) Login to one of the rac node (orarac1) and disable the cluster_database parameter by setting it to FALSE. Also add the archivelog parameters.

SQL> connect / as sysdba
SQL> alter system set cluster_database=FALSE scope=spfile;
SQL> alter system set log_archive_dest_1='+DATADG' scope=spfile;
SQL> alter system set log_archive_format='orcl_%t_%s_%r.arc; scope=spfile;

2) Shutdown the database from cluster

[oracle@orarac1 ~]$ srvctl stop database -d orcl

3) Mount the database on the local instance (orarac1:orcl1)

[oracle@orarac1 ~]$
SQL> startup mount
ORACLE instance started.

Total System Global Area 135337420 bytes
Fixed Size 452044 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
Database mounted.
SQL>

4) Put the database into ARCHIVELOG

SQL> alter database archivelog
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination +DATADG
Oldest online log sequence 33
Next log sequence to archive 34
Current log sequence 34
SQL>

5) Put the database back to cluster mode by setting the parameter cluster_database to TRUE and shut it down on current node (orarac1)

SQL> alter system set cluster_database=TRUE scope=spfile;
SQL> shutdown immediate

6) Startup the database in cluster

[oracle@orarac1 ~]$srvctl start database -d orcl

This will put the database back into cluster with archivelog enabled.

--Rishi



1 comment:

Review my blog

Hits since creation