The archive mode switching in the RAC environment is slightly different from that in a single instance, mainly because of the differences in shared storage. In this case, we can switch the RAC database to a non-cluster state.
The archive mode switching in the RAC environment is slightly different from that in a single instance, mainly because of the differences in shared storage. In this case, we can switch the RAC database to a non-cluster state.
The archive mode switching in the RAC environment is slightly different from that in a single instance, mainly because of the differences in shared storage. In this case, we can switch the RAC database to a non-cluster state and switch the archive mode on an instance to complete the archive Mode Conversion of the RAC database. This document describes how to switch from non-archive mode to archive mode, but not archive mode.
1. main steps:
Back up spfile to prevent database startup failure due to Parameter Modification failure
Set cluster_database to false.
Start a single instance to the mount status
Place the database in archive mode (alter database archivelog/noarchivelog)
Modify the cluster parameter cluster_database to true.
Close a single instance
Start cluster Database
2. Environment
Oracle @ bo2dbp: ~> Cat/etc/issue
Welcome to SUSE Linux Enterprise Server 10 SP3 (x86_64)-Kernel \ r (\ l ).
Oracle @ bo2dbp: ~> Sqlplus-v
SQL * Plus: Release 10.2.0.3.0-Production
Use asm storage to store archived logs
3. Modify the cluster database to archive Mode
Oracle @ bo2dbp: ~> Export ORACLE_SID = ora10g1
Oracle @ bo2dbp: ~> Sqlplus/as sysdba
SQL * Plus: Release 10.2.0.3.0-Production on Mon Dec 24 16:53:18 2012
Copyright (c) 1982,200 6, Oracle. All Rights Reserved.
Connected:
Oracle Database 10g Release 10.2.0.3.0-64bit Production
With the Real Application Clusters option
SQL> archive log list; --> View the archiving mode of the current database
Database log mode No Archive Mode --> non-Archive mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 59
Current log sequence 60
SQL> select instance_name, host_name, status from gv $ instance;
INSTANCE_NAME HOST_NAME STATUS
------------------------------------------------
Ora10g1 bo2dbp OPEN
Ora10g2 bo2dbs OPEN
SQL> show parameter cluster --> View cluster Parameters. If cluster_database is set to true, it indicates the cluster database. Otherwise, it is not a cluster database.
NAME TYPE VALUE
-----------------------------------------------------------------------------
Cluster_database boolean TRUE
Cluster_database_instances integer 2
Cluster_interconnects string
SQL> create pfile = '/u01/oracle/db/dbs/ora10g_0000.ora' from spfile; --> back up spfile first
File created.
SQL> alter system set cluster_database = false scope = spfile sid = '*'; --> modify this parameter to a non-cluster database. This parameter is a static parameter and must be set to scope = spfile.
System altered.
Oracle @ bo2dbp: ~> Srvctl stop database-d ora10g --> close database
Oracle @ bo2dbp: ~> Srvctl start instance-d ora10g-I ora10g1-o mount --> start a single instance to the mount status
Oracle @ bo2dbp: ~> Sqlplus/as sysdba
SQL> select instance_name, status from v $ instance;
INSTANCE_NAME STATUS
----------------------------
Ora10g1 MOUNTED
SQL> alter database archivelog; --> change database to archive Mode
Database altered.
SQL> alter system set cluster_database = true scope = spfile sid = '*'; --> change the database to cluster mode.
System altered.
SQL> ho srvctl stop instance-d ora10g-I ora10g1 --> close the current instance
SQL> ho srvctl start database-d ora10g --> start cluster database
SQL> archive log list;
ORA-03135: connection lost contact
SQL> conn/as sysdba
Connected.
SQL> archive log list; --> View archiving Mode
Database log mode Archive Mode --> Archive mode
Automatic archival Enabled --> Automatic archiving
Archive destination USE_DB_RECOVERY_FILE_DEST --> the Archive location is the value of DB_RECOVERY_FILE_DEST.
Oldest online log sequence 60 --> The following is the sequence information.
Next log sequence to archive 61
Current log sequence 61
SQL> show parameter db_recovery_file