DataGuard how to transmit Redo to Standby

Source: Internet
Author: User
Tags egrep

DataGuard how to transmit Redo to Standby

DataGuard transfers redo to standby and then applies the redo on standby to ensure data consistency between the two.
The lgwr process is used to transmit redo logs.

In the lgwr transfer mode, the lgwr process itself does not actually send redo to standby, but derives an lns (local network server) from lgwr)
Process to transmit redo information. The main advantage of this is to reduce the pressure on the lgwr process and prevent the lgwr process from being unstable due to network exceptions.

Client_process on standby is lgwr, but it is not lgwr to transmit logs.

StandbyANDBY> select process, client_process, standbyatus from v $ managed_standbyandby where process = 'rfs ';

PROCESS CLIENT_P standbyATUS
-----------------------------
RFS LGWR IDLE
RFS UNKNOWN IDLE
RFS UNKNOWN IDLE
RFS UNKNOWN IDLE

In PRIMARY, we can check the lgwr process by looking at the network connection. The connection to standby is not generated, but the network connection generated by the lns process.

[Root @ newplat ~] # Ps-eaf | egrep-e 'lgwr | lns' | grep-v 'egrep'
Oracle 8399 1 0? 00:01:08 ora_lgwr_cpd
Oracle 15207 1 0? 00:00:00 ora_lns1_cpd
[Root @ newplat ~] #

[Root @ newplat ~] # Netstandbyat-apn | egrep-e '2017 | 100'
Tcp 0 0 192.168.56.21: 38944 192.168.56.22: 1521 ESTABLISHED 15207/ora_lns1_cepd
Udp 0 0: 55415: * 8399/ora_lgwr_cpd
Udp 0 0: 1: 55419 ::: * 15207/ora_lns1_cepd
[Root @ newplat ~] #

Logs in the master database report the following logs, indicating that lns is available for transmission.

LNS: standbyandby redo logfile selected for thread 1 sequence 92 for destandbyination LOG_ARCHIVE_DEstandby_2
Sun Mar 20 11:09:35 2016
Archived Log entry 165 added for thread 1 sequence 91 ID 0xac83cb1e destandby 1:
Sun Mar 20 11:09:35 2016
ARC3: standbyandby redo logfile selected for thread 1 sequence 91 for destandbyination LOG_ARCHIVE_DEstandby_2
Sun Mar 20 11:45:15 2016


When the synchronization parameter in log_archive_destandby_X is changed from the default async to sync, alert. log appears

LGWR: standbyandby redo logfile selectedfor thread 1 sequence 103 for destandbyination LOG_ARCHIVE_DEstandby_2
Thread 1 advanced to log sequence 103 (LGWR switch)
Current log #1 seq #103 mem #0:/u01/app/oracle/oradata/cpd/redo01.log

In this configuration, many people think that the lgwr process directly transmits redo to the slave database. In fact, it can be seen through the network connection that the lns process sends the redo to the slave database.

[Root @ newplat ~] # Ps-eaf | egrep-e 'lgwr | lns' | grep-v egrep
Oracle 12664 1 0? 00:00:00 ora_lnsb_cpd
Oracle 18366 1 0? 00:00:01 ora_lgwr_cpd

[Root @ newplat ~] # Netstandbyat-anp | egrep-e '2017 | 100 ';
Tcp 0 0 192.168.56.21: 47971 192.168.56.22: 1521 ESTABLISHED 12664/ora_lnsb_cepd
Udp 0 0: 1: 49731 ::: * 12664/ora_lnsb_cepd
Udp 0 0: 51196: * 18366/ora_lgwr_cepd

The ARCH process also transmits redo logs, but archivelog is transmitted. When standby and PRIMARY generate a gap, the arch process is responsible for uploading logs on the PRIMARY to the standby database.

Sun Mar 20 20:22:54 2016
ARC3: standbyandby redo logfile selected for thread 1 sequence 105 for destandbyination LOG_ARCHIVE_DEstandby_2
Sun Mar 20 20:24:02 2016

View network connection information

[Root @ newplat ~] # Ps-eaf | egrep-e 'ora _ arc' | grep-v egrep
Oracle 18407 1 0? 00:00:00 ora_arc0_cpd
Oracle 18409 1 0? 00:00:00 ora_arcw.cpd
Oracle 18411 1 0? 00:00:00 ora_arc2_cpd
Oracle 18413 1 0? 00:00:00 ora_arc3_cpd
[Root @ newplat ~] # Netstandbyat-apn | grep 18413
Tcp 0 0 192.168.56.21: 54683 192.168.56.22: 1521 ESTABLISHED 18413/ora_arc3_cepd
Udp 0 0: 1: 43124 ::: * 18413/ora_arc3_cepd

Steps for installing Oracle 11gR2 in vmwarevm

Install Oracle 11g XE R2 In Debian

Important configuration parameters of Oracle Data Guard

Configure Oracle 11g Data Guard based on the same host

Explore Oracle 11g elastic uard

Oracle Data Guard (RAC + DG) archive deletion policies and scripts

Role conversion for Oracle Data Guard

FAL gap in Oracle Data Guard logs

Oracle 11g Data Guard Error 16143 Heartbeat failed to connect to standby

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.