Database Roles,
Primary - apxtest
Primary - apxtest
Standby - apxdr
Complete the configuration of Physical Standby and then proceed with DG Broker setup.
Create and Configure DG Broker Servicedgmgrl sys@apxtestDGMGRL> create configuration my_dg as primary database is apxtest connect identifier is apxtest;DGMGRL> show configuration;DGMGRL> add database apxdr as connect identifier is apxdr;DGMGRL> show configuration;DGMGRL> ENABLE CONFIGURATION;DGMGRL> show configuration;The broker log file is created in the same directory as the alert log and is named drc<$ORACLE_SID>. log .
Stop log apply:dgmgrl sys@apxtestDGMGRL> show configuration;DGMGRL> show database apxdr;DGMGRL> edit database apxdr set state=APPLY-OFF;DGMGRL> show database apxdr;
Start log apply:DGMGRL> edit database apxdr set state=APPLY-ON;DGMGRL> show database apxdr;
Example -
dgmgrl sys@apxtestDGMGRL for 64-bit Windows: Release 19.0.0.0.0 - ProductionVersion 19.24.0.0.0Copyright (c) 1982, 2024, Oracle and/or its affiliates. All rights reserved.Welcome to DGMGRL, type "help" for information.Password:Connected to "apxtest"DGMGRL> create configuration my_dg as primary database is apxtest connect identifier is apxtest;Configuration "my_dg" created with primary database "apxtest"DGMGRL> show configuration;Configuration - my_dgProtection Mode : MaxPerformanceMembers : apxtest - Primary databaseFast-Start Failover : DisabledConfiguration Status : DISABLEDDGMGRL> add database apxdr as connect identifier is apxdr;Database "apxdr" addedDGMGRL> show configuration;DGMGRL> show configuration;Configuration - my_dgProtection Mode : MaxPerformanceMembers : apxtest - Primary databaseapxdr - Physical standby databaseFast-Start Failover : DisabledConfiguration Status : DISABLEDDGMGRL> ENABLE CONFIGURATION;Enabled.
DGMGRL> show configuration;Configuration - my_dgProtection Mode : MaxPerformanceMembers : apxtest - Primary databaseapxdr - Physical standby databaseFast-Start Failover : DisabledConfiguration Status : SUCCESS (status updated 0 seconds ago)Stop log apply:============dgmgrl sys@apxtestDGMGRL> show database apxdr;Database - apxdrRole : PHYSICAL STANDBYIntended State : APPLY-ONTransport Lag : 0 seconds (computed 1 second ago)Apply Lag : 0 seconds (computed 1 second ago)Average Apply Rate : 3.00 KByte/sReal Time Query : OFFInstance(s) : apxdrDatabase Status: : SUCCESSDGMGRL> edit database apxdr set state=APPLY-OFF;Succeeded.AlertLog on DR database-------------------------------------------------------------------------------ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCELPR00 (PID:2540): MRP0: Background Media Recovery cancelled with status 16037Errors in file E:\ORACLE\APP\diag\rdbms\apxdr\apxdr\trace\apxdr_pr00_2540.trc:ORA-16037: user requested cancel of managed recovery operationPR00 (PID:2540): Managed Standby Recovery not using Real Time ApplyRecovery interrupted!Perform some Log switch on Primary to create a difference on DRThread Last Sequence Received Last Sequence Applied Difference---------------------------------------------------------------------------------------------------1 47 44 3Start log apply:============DGMGRL> edit database apxdr set state=APPLY-ON;Succeeded.
AlertLog on DR database-----------------------------------------------PR00 (PID:1624): Managed Standby Recovery starting Real Time ApplyParallel Media Recovery started with 8 slavesStopping change trackingPR00 (PID:1624): Media Recovery Log C:\BACKUP\XXTEST\APXTEST\ARCHIVES\APX_ARC_0000000045_1179826869_0001.ARCPR00 (PID:1624): Media Recovery Log C:\BACKUP\XXTEST\APXTEST\ARCHIVES\APX_ARC_0000000046_1179826869_0001.ARCPR00 (PID:1624): Media Recovery Log C:\BACKUP\XXTEST\APXTEST\ARCHIVES\APX_ARC_0000000047_1179826869_0001.ARCPR00 (PID:1624): Media Recovery Waiting for T-1.S-48 (in transit)Recovery of Online Redo Log: Thread 1 Group 4 Seq 48 Reading mem 0Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT NODELAYDGMGRL> show database apxdrDatabase - apxdrRole : PHYSICAL STANDBYIntended State : APPLY-ONTransport Lag : 0 seconds (computed 1 second ago)Apply Lag : 5 minutes 14 seconds (computed 1 second ago)Average Apply Rate : 3.00 KByte/sReal Time Query : OFFInstance(s) : apxdrDatabase Status : WARNINGDatabase Warning(s): ORA-16853: apply lag has exceeded specified threshold.This is because of the DIFFERENCE we had on DR server.Check again, the MRP process gets active and starts applying archives.DGMGRL> show database apxdrDatabase - apxdrRole : PHYSICAL STANDBYIntended State : APPLY-ONTransport Lag : 0 seconds (computed 1 second ago)Apply Lag : 5 minutes 14 seconds (computed 1 second ago)Average Apply Rate : 3.00 KByte/sReal Time Query : OFFInstance(s) : apxdrDatabase Status : SUCCESSThread Last Sequence Received Last Sequence Applied Difference-----------------------------------------------------------------------------------------------1 47 47 0
No comments:
Post a Comment