Friday, May 8, 2015

How to change RAC Database NoarchiveLog Mod to Archivelog mode

Login to one of the nodes (i.e. linux Node1) and disable the cluster instance parameter by setting cluster_database to FALSE from the current instance:

[oracle@host01 grid]$ sqlplus “/ as sysdba”
SQL*Plus: Release 11.2.0.1.0 Production on Sat May 2 03:04:06 2015
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> archive log list
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     26
Current log sequence           27

SQL> alter system set cluster_database=false scope=spfile sid=’racdb1′;
System altered.

SQL> show parameter cluster_database
NAME                                 TYPE        VALUE
———————————— ———– ——————————
cluster_database                     boolean     TRUE
cluster_database_instances           integer     1

Shutdown all instances accessing the clustered database:
srvctl stop database -d racdb

Startup same instance in ‘MOUNT EXCLUSIVE’ mode;
SQL> startup mount exclusive
ORACLE instance started.
Total System Global Area  523108352 bytes
Fixed Size                  1337632 bytes
Variable Size             398460640 bytes
Database Buffers          117440512 bytes
Redo Buffers                5869568 bytes
Database mounted.

crosscheck—-

SQL> show parameter cluster_database
NAME                                 TYPE        VALUE
———————————— ———– ——————————
cluster_database                     boolean     FALSE
cluster_database_instances           integer     1

Set required parameter

SQL> ALTER SYSTEM SET log_archive_start=TRUE scope=SPFILE;
System altered.

Shut the database and STARTUP MOUNT

SQL> shut immediate

Enable ARCHIVELOG mode
SQL> alter database archivelog;
database altered

SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     27
Next log sequence to archive   28
Current log sequence           28

Set cluster_database=true again.
SQL> alter system set cluster_database=true scope=spfile sid=’racdb1′ ;
System altered.

Shutdown the local instance:
Bring all instance up using srvctl:
SQL> shut immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.

[oracle@host01 ~]$ srvctl start database -d racdb
[oracle@host01 ~]$ srvctl status database -d racdb
Instance racdb1 is running on node host01
Instance racdb2 is running on node host02

No comments:

Post a Comment