Oracle Data Guard Learning (3) Log application

Source: Internet
Author: User

In the previous section, "Data Guard series (2)-Log Transfer", we introduced the DG Log Transport service, the log Application service is introduced in this section after the log is transferred from the main library to the standby repository, and the repository needs to apply logs to maintain synchronization with the main library.

Redo application or SQL application?

We know that there are two types of repositories, namely, physical and logical repositories, the physical repository log application is called Redo application, and the log application of logical reserve is called SQL application.

The so-called redo application refers to the use of media recovery method to use the main library transmission of the log, so the physical repository is like a mirror of the main library, not only the data, physical structure (such as data blocks, data files, etc.) are the same, the advantage is that the synchronization speed is fast.

The so-called SQL application refers to the standby library through log miner from the logs to parse out the SQL statements, and then apply these SQL statements, it is clear that the performance of SQL application is not comparable to redo applications, but it is more flexible. Logical repositories are used in SQL applications.

Real-time log applications

By default, only after the standby log file is archived for log application, if you want to receive the log from the main library, immediately log application, you must open the real-time application, so long as RFS process received the log and write standby log file, MRP/LSP The process can apply the log at the first time of the standby, so as to realize the real-time synchronization of the primary standby library.

The physical repository opens the real-time application through the following statements:  
sql> ALTER database RECOVER MANAGED STANDBY database using current LOGFILE;  
The logical repository opens the real-time application through the following statements:  
sql> ALTER DATABASE START LOGICAL standbyapply IMMEDIATE;

Turn on/off log application service

Physical repository:

--Open  
sql> ALTER database RECOVER MANAGED STANDBY database DISCONNECT;  
--Close  
sql> ALTER database RECOVER MANAGED STANDBY database CANCEL;

Logical repository:

--Open  
sql> ALTER DATABASE START LOGICAL STANDBY APPLY;  
--Close  
sql> ALTER DATABASE STOP LOGICAL STANDBY APPLY;

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/

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.