Oracle RAC Archiving vs. non-archive switching

Source: Internet
Author: User

Oracle's production libraries are all launched in archive mode, and the same is true for non-archived switches and single instances under RAC, both in the Mount mode and in the ALTER DATABASE Archivelog/noarchivelog command. The difference is that all instances in the RAC environment must be in a non-open state, and then execute the ALTER DATABASE command on any instance of the Mount state, and then start the other instance normally after the operation succeeds.

Note: Since you have multiple instances of the RAC database, be aware of each instance-related initialization parameter: Log_archive_dest_n settings, it is important to ensure that the path set by this parameter is valid and the archive can be carried out smoothly.

Switch Example:

[Email protected] dbs]$ export ORACLE_SID=RAW1

[Email protected] dbs]$ Sqlplus/nolog

Sql*plus:release 10.2.0.1.0-production on Mon Apr 19 16:17:43 2010

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Sql> Conn/as SYSDBA

Connected.

Sql> Archive Log List

Database log mode No Archive mode

Automatic Archival Disabled

Archive Destination Use_db_recovery_file_dest

Oldest online log sequence 21

Current log sequence 22

Sql>

Sql> select Inst_id,instance_name,version,archiver,status from Gv$instance;

inst_id instance_name VERSION ARCHIVE STATUS

----------  ----------------  -----------------      -------------- ------------

1 raw1 10.2.0.1.0 STOPPED OPEN

2 raw2 10.2.0.1.0 STOPPED OPEN

To modify the default path for an archive:

Sql> alter system set log_archive_dest_1= ' Location=/u01/raw1arch ' sid= ' raw1 ';

System altered.

Sql> alter system set log_archive_dest_1= ' Location=/u01/raw2arch ' sid= ' raw2 ';

System altered.

Sql> Show Parameter Log_archive

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

Log_archive_config string

Log_archive_dest string

Log_archive_dest_1 string Location=/u01/raw2arch

... ....

Log_archive_dest_state_1 string Enable

... ....

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

Log_archive_duplex_dest string

Log_archive_format string%t_%s_%r.dbf

Log_archive_local_first Boolean TRUE

Log_archive_max_processes Integer 2

Log_archive_min_succeed_dest Integer 1

Log_archive_start Boolean FALSE

Log_archive_trace integer 0

To switch the archive mode:

Note: All nodes must be in the Mount state. Modify the mode in one of the nodes, and then start the other node normally.

sql> startup Mount;

ORACLE instance started.

Total System Global area 184549376 bytes

Fixed Size 1218412 bytes

Variable Size 113248404 bytes

Database buffers 67108864 bytes

Redo buffers 2973696 bytes

Database mounted.

sql> ALTER DATABASE Archivelog;

Database altered.

sql> ALTER DATABASE open;

Database altered.

sql> archive log list;

Database Log Mode Archive mode

Automatic Archival Enabled

Archive Destination/u01/raw2arch

Oldest online log sequence 14

Next Log sequence to archive 15

Current log Sequence 15

Start another node to view the status:

sql> ALTER DATABASE open;

Database altered.

sql> archive log list;

Database Log Mode Archive mode

Automatic Archival Enabled

Archive Destination/u01/raw1arch

Oldest online log sequence 21

Next Log sequence to archive 22

Current log sequence 22

Sql>

Now the RAC has switched to archive mode.

Two Switch to non-archive

Perform on a single host:

Sql>alter SYSTEM SET cluster_database=false scope=spfile;

Execute on two hosts:
Sql>shutdown immediate;

Perform on a single host:
Sql>startup Mount;
Sql>alter database Noarchivelog;
Sql>alter SYSTEM SET cluster_database=true scope=spfile;
Sql>shutdown immediate;

Execute on two hosts:
Sql>startup

Ext.: http://blog.csdn.net/tianlesoftware/article/details/5501184

Oracle RAC Archiving vs. non-archive switching

Related Article

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: info-contact@alibabacloud.com 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.