Oracle Dataguard Introduction

Source: Internet
Author: User

Oracle Dataguard Introduction

First, the basic principle of Dataguard

When a transaction makes changes to data in the production database , the oracle database will record this change in an online redo log file. This process of writing logs can be configured in Dataguard, in addition to logging to local online log files and archive log files, and through the network, the log information can be sent to the remote from ( Standby) on the database server. This standby log file write process can be real-time, synchronous, to achieve zero data loss (maximum protected mode maximum protection maximum performance maximum availability data Guard can automatically use the log information to synchronize the data with the primary database in real time. When the primary database is open and active, the standby database can perform the restore operation, if the primary database fails, The standby database can be activated and take over the work of the production database

Second, features of three modes

protection mode Type

< Span style= "color:black" > risk of data loss in the event of a disaster

Redo transport mechanism

do you need standby redo log

disk write

maximum protection

0 data loss

LGWR Span style= "Color:black" >sync

yes

affirm

highest availability

0 data loss

LGWR Span style= "Color:black" >sync

yes

affirm

highest performance

minimum data loss Span style= "Color:black" >- Typically a few seconds

LGWR ASYNC or ARCH

there is no but recommended

affirm noaffirm

affirm: Represents the primary database on the REDO log is only valid if it is written to standby log from the database .

n maximum protection mode

Maximum protection mode provides the highest level of data protection for the primary database, ensuring a comprehensive 0 data loss disaster recovery solution. When running in maximum protected mode, the redo record is transferred synchronously from the primary database to the standby database by the log writer (LGWR) session, and the transaction is committed on the primary database until the transaction data is confirmed to be available on the disk at at least one standby server. It is strongly recommended that this mode should have at least two standby databases configured. When the last participating standby database is unavailable, processing on the primary database is stopped. This ensures that transactions are not lost when the primary database loses contact with all of its standby databases.

This maximum protection mode may potentially affect the primary database response time due to the synchronization characteristics of the redo transport. You can minimize this impact by configuring a low-latency network and assigning it enough bandwidth to handle peak transaction loads. Companies that need this maximum protection model are stock exchanges, currency exchanges, financial institutions, and so on.

n maximum availability mode

the highest availability mode has the second highest level of primary database data availability. As with the maximum protected mode, the redo data is transferred synchronously from the primary database to the standby database by LGWR, and the transaction is completed on the primary database until the transaction data is confirmed to be available on the disk of the standby server. However, in this mode (unlike the maximum protected mode), if the last participating standby database becomes unavailable -for example, due to network connectivity issues, processing will continue on the primary database (similar to MySQL-5.5 in the semi-synchronous replication in the same). The standby database may be temporarily behind the primary database, but when it becomes available again, the standby database will automatically synchronize with the archived logs accumulated on the primary database without losing data.

Due to synchronous retransmission, this protection mode can potentially affect response time and throughput. You can minimize this impact by configuring a low-latency network and assigning it enough bandwidth to handle peak transaction loads.

The highest availability mode is intended to ensure that you have 0 data loss protection, but you do not want the production database to be subject to network /standby server failure affects the enterprise. If another failure subsequently affects the production database and then the initial network /standby server failure is resolved, these enterprises will accept the possibility of data loss.

n maximum performance mode

The maximum performance mode is the default protection mode. It provides slightly less primary database data protection than the highest availability mode, but provides higher performance. In this mode, when the primary database processes transactions, the redo data is transferred asynchronously to the standby database by the LGWR process. Alternatively, the archiver process (ARCH) on the primary database can be configured to transfer the redo data in this mode. In any case, the write operation on the primary database is completed first, and the commit operation of the primary database does not wait for the standby database to acknowledge receipt (similar to asynchronous replication in MySQL). If any of the standby target databases become unavailable, processing will continue on the primary database, with little or no impact on performance.

in the case of a primary database failure, the redo data that has not been sent to the standby database is lost. However, if the network has sufficient throughput to keep up with the heavy traffic spikes, and the LGWR process is used to transfer the redo traffic to the standby server, the lost transaction will be very small or zero.

Third, Oracle Dataguard Three modes of protection features

n maximum protection mode

1). This mode provides the highest level of data protection

2). Redo log after at least one physical from the library database , the transaction of the main library is able to commit

3). When the main library cannot find a suitable write from the library, the main library shuts down automatically, preventing unprotected data from appearing

4). Pros: This mode guarantees no data loss from the library

5). Disadvantage: The automatic shutdown of the main library will affect the availability of the main library, and it needs to be recovered from the library before it can be submitted, the objective conditions such as network requirements are very high, the performance of the main library will be greatly affected.

n maximum availability mode

1). This mode provides the ability to protect data only after the "Maximum protection mode"

2). Redo log after at least one physical from the library database, the transaction of the main library is able to commit

3). When the main library cannot find a suitable write from the library, the main library is not closed, but temporarily lowered to "Maximum performance mode" mode until the problem is processed

4). Advantages: This mode can ensure that there is no data loss from the library without problems, it is a compromise method

5). Disadvantages: The disadvantage of the normal operation is that the performance of the main library is affected by many factors.

n maximum performance mode

1). Default mode, providing the highest availability of the primary database

2). Ensure that the main library is not affected by the library, and that the main library transaction is committed without affecting the operation of the main library due to any problems from the library.

3 ). Pros: Avoids the impact of the performance and availability of the library on the primary database

4 ). Cons: If the recovery data related to the transaction submitted by the main library is not sent to the slave library, these transactional data will be lost and no data loss is guaranteed

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.