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/