ORACLE DG Topic 1--DG Identity

Straight to the point

         ORACLE DG is one of the three major characteristics of ORACLE DB enterprise data management (RAC, DG, RMAN), where RAC stands for real application cluster, DG stands for data guard, and RMAN stands for recovery manager.器).

RAC can provide multi-machine cluster function, multiple devices provide external services at the same time, the failure of a single device will not affect the entire data service;

DG provides redundant data backup function, that is, the database is divided into the main database and the standby database. The main database is mainly responsible for providing services to the outside world. The standby database synchronizes the main database data to form a redundant backup. When the main database fails, the standby database can be upgraded to the main database In order to minimize data loss;

RMAN provides a wealth of data backup and recovery functions, such as full backup, incremental backup, full recovery, incomplete recovery based on point in time, and so on.

         This series of blog posts takes ORACLE DG as the main line and describes in detail the main features and functions of ORACLE DG. This article starts with the members of ORACLE DG and leads everyone into the world of ORACLE DG.

Oracle DG identity

         ORACLE DG divides the instance into the primary database, standby database, and Far Sync instance (remote synchronization instance, supported by 12c). The main database generates redo logs and archive logs for external services and transmits them to the standby database via the network. The redo logs received by the standby database application form the same data copy as the main database. Far Sync is a new feature introduced by 12c to solve the problem of long-distance log transmission delay. It is a virtual database instance, used to synchronously introduce the redo log of the main database and asynchronously transfer it to the standby database, which can reduce the network transmission load of the main database. A typical DG architecture is shown in the figure below.

Main library

         An ORACLE DG architecture contains a production main library, which can be a single-instance database or a RAC architecture;

Backup database

         The standby database is the transactional continuity parent of the main database data, and 12c supports a maximum of 30 standby databases. Similar to the main database, the standby database can be either a single-instance architecture or a RAC architecture. In addition, the standby database has the following three types:

  • Physical standby--physical standby database

The physical standby database makes a complete copy of the main database data through redo application, that is, the data on the disk of the main database is exactly the same (physical data structure).

  • Logical standby--logical standby database

The logical standby database uses SQL applications, that is, the content of the redo log is first parsed into the main SQL database, and then the SQL statement is executed on the standby database to form the same data content as the main database. However, because Oracle's internal disk reads and writes after SQL execution is not the same, the physical data structure of the logical standby database and the main database may be different.

Logical standby database is mainly used for Oracle rolling upgrade (the physical standby database upgrade may have redo log incompatibility issues). For example, if the main database of Oracle 12c is configured with a 12c logical standby database, first upgrade the logical standby database to 19c; then 19c Switch the logical standby database to the main database, and switch the 12c main database to standby; finally upgrade the 12c standby database. This can greatly reduce the business interruption time.

  • Snapshot Standby--snapshot standby database

The snapshot standby database is a fully updateable standby database. Like the physical standby database and the logical standby database, the snapshot standby database also receives the redo logs of the main database, but it does not apply the redo logs. The snapshot standby database is transformed from the physical standby database. It is used to temporarily turn on the read-write function of the standby database for testing in some occasions. After the test is completed, it is switched to the physical standby database to continue to apply the redo logs of the main database to synchronize the main and standby databases. .

Far Sync

Far Sync is a virtual instance created in the intermediate node to solve the problem of long-distance data transmission delay between the main and standby databases. This instance is very special. It only has parameter files, password files and control files, and it needs to be emphasized that there is no data file. Far Sync receives the redo logs of the main database to form standby redo logs and archives them as local redo logs, and then asynchronously transfers this redo log to the standby database.

to sum up

As mentioned above, in the face of different enterprise application scenarios, oracle DG provides a wealth of database active and standby application functions. Users can configure different backup database types according to specific scenarios and business criticality to achieve maximum data protection.

 The following will talk about the data protection mode of ORACLE DG.

Guess you like

Origin blog.csdn.net/zhaogang1993/article/details/100799550