Modify the archive mode in the RAC Environment

Source: Internet
Author: User

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 the database from being unable to start because parameter modification fails. Set cluster_database to false to start a single instance to mount. Place the database in archive mode (alter database archivelog/noarchivelog) change the cluster parameter cluster_database to true to disable single-instance cluster database startup. 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 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 on Mon Dec 24 16:53:18 2012 copyright (c) 1982,200 6, Oracle. all rights reserved. connected to: Oracle Database 10g Release production with the real application clusters option SQL> archive log list; --> View the archive mode of the current database log mode No archive mode --> non-archive mode: Automatic Archival disabled archive destination use_db_reco Very_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 true, it indicates the cluster database. Otherwise, non-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_assist.ora' from spfile; --> back up the spfile file created first. 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 state 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 database to cluster mode system altered. SQL> Ho srvctl stop instance-D ora10g-I ora10g1 --> close 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 the archive mode Database Log mode archive mode --> the archive mode is in the archive mode. The automatic Archive destination use_db_recovery_file_dest --> the archive location is the value of the parameter db_recovery_file_dest, oldest --> next log sequence to archive 61 current log sequence 61 SQL> show parameter db_recovery_file name type value ----------- mongodb_recovery_file_dest string + rev 1_big integer 2g4 and archive verification SQL> select inst_id, name, thread #, sequence #, status from GV $ archived_log; --> NO archived log no rows selected SQL> alter system switch logfile; --> archive system altered on instance 1. SQL> Col name format a65 SQL> select inst_id, name, thread #, sequence #, status from GV $ archived_log; --> check that the logs with 61 sequence have archived inst_id name thread # sequence # s ---------- bytes -----------1 + rev/ora10g/archivelog/2012_12_24/limit 1 61 SQL> select name, thread #, sequence #, status from V $ archived_log; --> the following is an instance-level view of name thread # sequence # S Sequence -----------+ rev/ora10g/archivelog/2012_12_24/lifecycle 1 61 a SQL> conn system/Oracle @ ora10g2 --> connect to instance 2 connected. SQL> show parameter instance_name; Name type value generation ----------- -------------------------------- instance_name string ora10g2 SQL> alter system switch logfile; --> archive system altered on instance 2. SQL> select inst_id, name, thread #, sequence #, status from GV $ archived_log; --> you can see that the log with a sequence of 43 has been archived --> note that the same archived log appears in both the Chinese and foreign instances in this view, inst_id name thread # sequence # s ---------- visible -----------1 + rev/ora10g/archivelog/2012_12_24/61 A 1 + rev/ora10g/archivelog /2012_12_24/Jun 2 43 A 2 + rev/ora10g/archivelog/2012_12_24/Jun 1 61 A 2 + rev/ora10g/archivelog/2012_12_24/Jun 2 43 A --> view log status --> note that the V $ log view displays the groups and statuses of the two instances --> Use thread # To differentiate them, if thread # is set to 1, the log group on instance 1 has 1, 2, and 1 is in the current status. thread #2 is similar. SQL> select * from V $ log; group # thread # sequence # bytes members arc status first_change # first_tim ---------- ------------ ---------- --- hour ----------- 1 1 62 52428800 2 no current 4314741 24-dec-12 2 1 61 52428800 2 Yes active 4312116 24-dec-12 3 2 43 52428800 2 Yes active 4312300 24-dec-12 4 2 44 52428800 2 no current 4315097 24-dec-12 --> author: robinson --> blog: --> archive the current log, note that this command is equivalent to alter system switch logfile under a single instance --> it is different in the RAC environment, that is, the current logs on all instances will be archived SQL> alter system archive log current; System altered. --> The following query verifies the preceding description --> log 62 and 44 are the archived log SQL statements generated at the same time by the preceding command> select inst_id, name, thread #, sequence #, status from gv $ archived_log; inst_id name thread # sequence # s ---------- bytes -----------2 + rev/ora10g/archivelog/2012_12_24/Rev 1 61 A 2 + rev/ora10g/archivelog/2012_12_24/limit 2 2 + rev/ora10g/archivelog/2012_12_24/g02 44 A 2 + rev/ora10g/archivelog/Rev/g01 62 A 1 + rev/ora10g/archivelog/2012_12_24/g01 61 A 1 + rev/ora10g/archivelog/2012_12_24/REV 2 43 A 1 + rev/ora10g/archivelog/2012_12_24/REV 2 44 A 1 + rev/ora10g/archivelog/logs/ thread_eclipseq_62.457.802894341 1 62 A 8 rows selected.

More references

For more information about Oracle RAC, see
Use crs_setperm to modify the resource owner and permissions of RAC.
Use crs_profile to manage RAC resource configuration files
RAC database startup and Shutdown
Oracle RAC services
Services in Oracle Database 10g
Migrate datbase from single instance to Oracle RAC
Connect Oracle RAC to a specified instance
Oracle RAC load balancing test (combined with server and client)
Oracle RAC server connection Load Balance)
Load Balance)
Non-Default port listening configuration in Oracle RAC (listener. ora tnsnames. ora)
Oracle RAC Listener Configuration (listener. ora tnsnames. ora)
Configure RAC load balancing and Failover
CRS-1006, CRS-0215 fault case
Installing Oracle 10g RAC Based on Linux (RHEL 5.5)
Use runcluvfy to verify the Oracle RAC installation environment

For more information about the basics and concepts of Oracle network configuration, see:
Configure dynamic service registration for non-default ports
Configure sqlnet. ora to restrict IP Access to Oracle
Configure and manage Oracle listener logs
Set the Oracle listener password (listener)
Configure the Oracle client to connect to the database

For more information about user-managed backup and recovery, see
Oracle cold backup
Oracle Hot Backup
Concept of Oracle backup recovery
Oracle instance recovery
Oracle recovery based on user management
System tablespace management and Backup Recovery
Sysaux tablespace management and recovery
Oracle backup control file recovery (unsing backup controlfile)

For information on RMAN backup recovery and management, see
RMAN overview and architecture
RMAN configuration, Monitoring and Management
Detailed description of RMAN backup
RMAN restoration and recovery
Create and use RMAN catalog
Create RMAN storage script based on catalog
Catalog-based RMAN backup and recovery
RMAN backup path confusion
Use RMAN for recovery from different machine backups (WIN platform)
Use RMAN to migrate a file system database to ASM
Linux RMAN backup shell script
Use RMAN to migrate the database to a different machine

For the Oracle architecture, see
Oracle tablespace and data files
Oracle Password File
Oracle parameter file
Oracle online redo log file)
Oracle Control File)
Oracle archiving logs
Oracle rollback and undo)
Oracle database instance startup and Shutdown Process
Automated Management of Oracle 10g SGA
Oracle instances and Oracle databases (Oracle Architecture)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.