Data protection mode in Oracle10gDG

Source: Internet
Author: User
This mode ensures that data is not lost when primaryDatabase fails. In this mode, make sure that the Redo data has been written to PrimaryData before the transaction is committed.

This mode ensures that data is not lost when the primary Database fails. In this mode, before the transaction is committed, ensure that the Redo Data has been written to the Primary Data

Data Guard Protection mode)

Maximum protection)

This mode ensures that data is not lost when the primary Database fails. In this mode, before the transaction is committed, ensure that the Redo data has been written to the Online Redologs of the Primary Database, and write the Standby Redologs of the Standby Database, and ensure that the data is available in at least one Standby Database. If the Standby Database is unavailable, the Primary Database will shut down.

Maximum availability)

This mode provides the highest level of data protection policies without affecting the availability of the Primary Database. This mode also ensures that data is not lost. Before the transaction is committed, ensure that the Redo data has been written to the Online Redologs of the Primary Database, and the Standby Redologs of the Standby Database at the same time to ensure that it is available in at least one Standby Database. Unlike the maximum protection mode, if the Standby Database fails and becomes unavailable, the Primary Database will not be shut down, but will be automatically converted to the highest-performance mode. After the Standby Database recovers to normal, the Primary Database automatically switches to the highest availability mode.

Maximum performance)

This is a default protection mode. Transactions can be committed at any time. The Redo data of the current Primary Database must be written to at least one Standby Database. However, this method does not wait for confirmation of whether the Standby Database is written. Therefore, this write method is asynchronous.

This mode is often used when the network has a large bandwidth available.

Annotation: maximum protection and maximum availability require at least one Standby Database Redo data to be written synchronously. You must specify the LOG_ARCHIVE_DEST_n initialization parameter for the preceding three types of protection.

Install Oracle 11gR2 (x64) in CentOS 6.4)

Steps for installing Oracle 11gR2 in vmwarevm

Install Oracle 11g XE R2 In Debian

Configure Oracle 11g Data Guard based on the same host

Explore Oracle 11g elastic uard

Oracle Data Guard (RAC + DG) archive deletion policies and scripts

Role conversion for Oracle Data Guard

FAL gap in Oracle Data Guard logs

Oracle 11g Data Guard Error 16143 Heartbeat failed to connect to standby

1. Set Data Protection Mode in DG Configuration

Maximum protection Maximum availability Maximum performance)

Redo archival processLGWRLGWRLGWR or ARCH

Network transmission modeSYNCSYNCSYNC or ASYNC when using LGWR process. SYNC if using ARCH process

Disk write optionaffirmaffirmaffrem or noaffrem

Standby redo log required? YesYesNo, but it is recommended

View the protection mode of the current database as follows:
SQL> select DATABASE_ROLE, PROTECTION_MODE, PROTECTION_LEVEL from v $ database;

DATABASE_ROLE PROTECTION_MODE PROTECTION_LEVEL
--------------------------------------------------------
PRIMARY MAXIMUM PERFORMANCE

Modify the database protection mode to maximize availability, as shown below:
SQL> startup mount -- slave database starts to mount
ORACLE instance started.

Total System Global Area 281018368 bytes
Fixed Size 2020160 bytes
Variable Size 88083648 bytes
Database Buffers 184549376 bytes
Redo Buffers 6365184 bytes
Database mounted.
SQL> show parameter LOG_ARCHIVE_DEST_2; -- standby database parameter query

NAME TYPE VALUE
-----------------------------------------------------------------------------
Log_archive_dest_2 string SERVICE = orcl lgwr async valid _ FOR = (ONLINE_LOGFILES, PRIMARY_ROLE) DB_UNIQUE_NAME = orcl

SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2 = 'service = myorcl OPTIONAL LGWR SYNC affrem VALID_FOR = (ONLINE_LOGFILES, PRIMARY_ROLE) DB_UNIQUE_NAME = myorcl '; -- backup database parameter settings

System altered.

SQL> ALTER SYSTEM SET LOG_ARCHIVE_CONFIG = 'dg _ CONFIG = (myorcl, orcl )';

System altered.

SQL> SHUTDOWN IMMEDIATE;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> STARTUP MOUNT;
ORACLE instance started.

Total System Global Area 281018368 bytes
Fixed Size 2020160 bytes
Variable Size 109055168 bytes
Database Buffers 163577856 bytes
Redo Buffers 6365184 bytes
Database mounted.
SQL> ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE AVAILABILITY; -- modify the Data Protection Mode

Database altered.

SQL> ALTER DATABASE OPEN;

Database altered.

SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2 = 'service = orcl OPTIONAL LGWR SYNC affrem VALID_FOR = (ONLINE_LOGFILES, PRIMARY_ROLE) DB_UNIQUE_NAME = orcl '; -- backup database settings

System altered.

SQL> SELECT PROTECTION_MODE, PROTECTION_LEVEL FROM V $ DATABASE;

PROTECTION_MODE PROTECTION_LEVEL
----------------------------------------
MAXIMUM AVAILABILITY RESYNCHRONIZATION

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.