原有状态最大性能: DGMGRL> SHOW CONFIGURATION lag verbose Configuration - dg_config Protection Mode: MaxPerformance Members: orcl - Primary database orcl2dg - Physical standby database Transport Lag: 0 seconds (computed 0 seconds ago) Apply Lag: 0 seconds (computed 0 seconds ago) orcl0dg - Physical standby database Transport Lag: 0 seconds (computed 0 seconds ago) Apply Lag: 0 seconds (computed 0 seconds ago) Properties: FastStartFailoverThreshold = '30' OperationTimeout = '30' TraceLevel = 'USER' FastStartFailoverLagLimit = '30' CommunicationTimeout = '180' ObserverReconnect = '0' FastStartFailoverAutoReinstate = 'TRUE' FastStartFailoverPmyShutdown = 'TRUE' BystandersFollowRoleChange = 'ALL' ObserverOverride = 'FALSE' ExternalDestination1 = '' ExternalDestination2 = '' PrimaryLostWriteAction = 'CONTINUE' ConfigurationWideServiceName = 'orcl_CFG' Fast-Start Failover: Disabled Configuration Status: SUCCESS DGMGRL> DGMGRL> DGMGRL> --准备设置保护模式! edit database orcl2dg set property LogXptMode='sync'; edit database orcl2dg set property NetTimeout=30; DGMGRL> show database verbose orcl2dg Database - orcl2dg Role: PHYSICAL STANDBY Intended State: APPLY-ON Transport Lag: 0 seconds (computed 1 second ago) Apply Lag: 0 seconds (computed 1 second ago) Average Apply Rate: 12.00 KByte/s Active Apply Rate: 0 Byte/s Maximum Apply Rate: 0 Byte/s Real Time Query: ON Instance(s): orcl2dg Properties: DGConnectIdentifier = 'prdg19/orcl2dg' ObserverConnectIdentifier = '' FastStartFailoverTarget = '' PreferredObserverHosts = '' LogShipping = 'ON' RedoRoutes = '' LogXptMode = 'sync' DelayMins = '0' Binding = 'optional' DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MaxAvailability; Succeeded. DGMGRL> --设置保护模式后: DGMGRL> SHOW CONFIGURATION lag verbose Configuration - dg_config Protection Mode: MaxAvailability Members: orcl - Primary database orcl2dg - Physical standby database Transport Lag: 0 seconds (computed 0 seconds ago) Apply Lag: 0 seconds (computed 0 seconds ago) orcl0dg - Physical standby database Transport Lag: 0 seconds (computed 0 seconds ago) Apply Lag: 0 seconds (computed 0 seconds ago) Properties: FastStartFailoverThreshold = '30' OperationTimeout = '30' TraceLevel = 'USER' FastStartFailoverLagLimit = '0' CommunicationTimeout = '180' ObserverReconnect = '0' FastStartFailoverAutoReinstate = 'TRUE' FastStartFailoverPmyShutdown = 'TRUE' BystandersFollowRoleChange = 'ALL' ObserverOverride = 'FALSE' ExternalDestination1 = '' ExternalDestination2 = '' PrimaryLostWriteAction = 'CONTINUE' ConfigurationWideServiceName = 'orcl_CFG' Fast-Start Failover: Disabled Configuration Status: SUCCESS DGMGRL> --归档信息 log_archive_dest_2 string service="prdg19/orcl2dg", SYNC ***** 同步传输 AFFIRM delay=0 optional compr ession=disable max_failure=0 r eopen=5 db_unique_name="orcl2d g" net_timeout=30, valid_for=( online_logfile,all_roles) log_archive_dest_20 string log_archive_dest_21 string log_archive_dest_22 string log_archive_dest_23 string log_archive_dest_24 string log_archive_dest_25 string log_archive_dest_26 string log_archive_dest_27 string log_archive_dest_28 string log_archive_dest_29 string log_archive_dest_3 string service="prdg19/orcl0dg", ASYN *** 异步传输 C NOAFFIRM delay=0 optional co mpression=disable max_failure= 0 reopen=5 db_unique_name="orc l0dg" net_timeout=8, valid_for =(online_logfile,all_roles) 备库:hang rfs进程 SQL> set linesize 300 SQL> set pagesize 3000 SQL> select pid,NAME,TYPE,CLIENT_PID,THREAD#, BLOCK#,ROLE,ACTION,CLIENT_ROLE from v$dataguard_process; PID NAME TYP CLIENT_PID THREAD# BLOCK# ROLE ACTION CLIENT_ROLE ------------------------ ----- --- ---------- ---------- ---------- ------------------------ ------------ ---------------- 5846 LGWR KSB 0 0 0 log writer IDLE none 5882 TMON KSB 0 0 0 redo transport monitor IDLE none 5950 TT00 KSV 0 0 0 gap manager IDLE none 5956 TT01 KSV 0 0 0 redo transport timer IDLE none 5948 ARC0 KSB 0 0 0 archive local IDLE none 5958 ARC1 KSB 0 0 0 archive redo IDLE none 5960 ARC2 KSB 0 0 0 archive redo IDLE none 5962 ARC3 KSB 0 0 0 archive redo IDLE none 6013 INSV KSB 0 0 0 broker instance slave IDLE none 5867 DMON KSB 0 0 0 broker monitor IDLE none 6075 NSV0 KSB 0 0 0 broker net slave IDLE none 6438 rfs NET 22518 0 0 RFS archive IDLE archive gap 6460 RSM0 KSB 0 0 0 broker worker IDLE none 6837 MRP0 KSB 0 1 69 managed recovery APPLYING_LOG none 16586 rfs NET 22521 1 0 RFS archive IDLE archive gap 19983 rfs NET 22104 1 69 RFS sync IDLE log writer 20193 rfs NET 22509 1 0 RFS ping IDLE gap manager 17 rows selected. SQL> oradebug setospid 19983 Oracle pid: 48, Unix process pid: 19983, image: oracle@prdg19 SQL> oradebug suspend Statement processed. SQL> oradebug resume; Statement processed. SQL> oradebug suspend --经过测试,主库到同城备库timeout内,主库hang
脚本:
alter session set nls_date_format='YYYY-MM-DD HH24:MI:SS';
select sysdate from dual;
create table 03 as select 1 a from dual;
select sysdate from dual;
结果:
SQL> select sysdate from dual; SYSDATE ------------------- 2024-10-11 13:23:18 SQL> create table a03 as select 1 a from dual; select sysdate from dual; Table created. SQL> SYSDATE ------------------- 2024-10-11 13:23:37 --保护模式降级 DGMGRL> SHOW CONFIGURATION lag verbose Configuration - dg_config Protection Mode: MaxAvailability Members: orcl - Primary database Warning: ORA-16629: database reports a different protection level from the protection mode orcl2dg - Physical standby database Warning: ORA-16809: multiple warnings detected for the member Transport Lag: 2 minutes 7 seconds (computed 0 seconds ago) Apply Lag: 2 minutes 7 seconds (computed 0 seconds ago) orcl0dg - Physical standby database Transport Lag: 0 seconds (computed 0 seconds ago) Apply Lag: 0 seconds (computed 0 seconds ago)
DGMGRL> SHOW CONFIGURATION lag verbose Configuration - dg_config Protection Mode: MaxAvailability Members: orcl - Primary database orcl2dg - Physical standby database Transport Lag: 0 seconds (computed 0 seconds ago) Apply Lag: 0 seconds (computed 0 seconds ago) orcl0dg - Physical standby database Transport Lag: 0 seconds (computed 0 seconds ago) Apply Lag: 0 seconds (computed 0 seconds ago) Properties: FastStartFailoverThreshold = '30' OperationTimeout = '30' TraceLevel = 'USER' FastStartFailoverLagLimit = '0' CommunicationTimeout = '180' ObserverReconnect = '0' FastStartFailoverAutoReinstate = 'TRUE' FastStartFailoverPmyShutdown = 'TRUE' BystandersFollowRoleChange = 'ALL' ObserverOverride = 'FALSE' ExternalDestination1 = '' ExternalDestination2 = '' PrimaryLostWriteAction = 'CONTINUE' ConfigurationWideServiceName = 'orcl_CFG' Fast-Start Failover: Disabled Configuration Status: SUCCESS DGMGRL>
oradebug resum 后恢复
标签:ago,computed,seconds,Lag,hang,传输,IDLE,timeout,archive From: https://www.cnblogs.com/notonlydba/p/18458176