[Oracle] Data Guard series (3)-log application Redo application or SQL application? We know that there are two types of standby databases: Physical standby database and logical standby database. The log application of the physical standby database is called the Redo application, the log application of the logical standby database is called the SQL application. The so-called Redo application refers to the logs transmitted from the master database in the standby database using the media recovery method. Therefore, the physical standby database is like a mirror of the master database, not only the data, the physical structure (such as data blocks and data files) is the same. The advantage of this is that the synchronization speed is fast. The so-called SQL application means that the slave database parses SQL statements from the Log through Log Miner and then applies these SQL statements. Obviously, the performance of SQL applications is inferior to that of Redo applications, but it is more flexible. The logical standby database uses SQL applications. By default, real-time log applications can only be applied after the Standby log files are archived. If you want to receive the logs transmitted from the master database, log applications will be performed immediately, the real-time application must be enabled, so that after the RFS process receives logs and writes the Standby log file, the MRP/LSP process can apply logs to the Standby database immediately, to achieve real-time synchronization of the master and slave databases.
[SQL] The physical standby database uses the following statement to enable real-time applications: SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE; the logical STANDBY DATABASE uses the following statement to enable real-time applications: SQL> ALTER DATABASE START LOGICAL STANDBYAPPLY IMMEDIATE;
Enable/disable the log application service physical standby database:
[SQL] -- enable SQL> alter database recover managed standby database disconnect; -- disable SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL; logical STANDBY DATABASE: [SQL] -- enable SQL> alter database start logical standby apply; -- disable SQL> ALTER DATABASE STOP LOGICAL STANDBY APPLY;