Convention.
DB_NAME=ORACLE_SID=XXXXXXX
Validate Data Guard Configuration.
$ ./dgmgrl_validate_srl.sh
======================== XXXXXXX1 ========================
XXXXXXX_PHOENIX
Current Log File Groups Configuration:
Thread # Online Redo Log Groups Standby Redo Log Groups Status
(XXXXXXX_SYDNEY) (XXXXXXX_PHOENIX)
1 4 4 Insufficient SRLs
2 4 4 Insufficient SRLs
Future Log File Groups Configuration:
Thread # Online Redo Log Groups Standby Redo Log Groups Status
(XXXXXXX_PHOENIX) (XXXXXXX_SYDNEY)
1 4 4 Insufficient SRLs
2 4 4 Insufficient SRLs
--------------------------------------------------
Using emcli to verify Data Guard Configuration and Create Missing SRLs.
[oracle@emhost bin]$ $OMS_HOME/bin/emcli version
Oracle Enterprise Manager 13c EM CLI Version 13.4.0.0.0
[oracle@emhost bin]$ $OMS_HOME/bin/emcli login -username=sysman
Enter password :
Login successful
[oracle@emhost bin]$ $OMS_HOME/bin/emcli sync
Synchronized successfully
--- Find target name and verify targets do not have domain name as there is BUG what will cause failure.
[oracle@emhost bin]$ cd $OMS_HOME/bin/
[oracle@emhost bin]$ ./emcli get_targets -targets=rac_database -format=name:csv | grep XXXXXXX
1,Up,rac_database,XXXXXXX_PHOENIX
1,Up,rac_database,XXXXXXX_SYDNEY
--- Verify Data Guard configuration and create missing SRLs.
[oracle@emhost bin]$ ./emcli dg_verify_config -primary_target_name="XXXXXXX_SYDNEY" -primary_target_type="rac_database" -create_srls
Parsing command line arguments...
Verify Data Guard Configuration procedure VERIFY_DG_CONFIG_20210526091058954 has been submitted for primary database XXXXXXX_SYDNEY.
--- Check progress for VERIFY_DG_CONFIG_20210526091058954
[oracle@emhost bin]$ ./emcli get_instances | grep -B1 VERIFY_DG_CONFIG_20210526091058954
GUID Execution GUID Type Name Status Owner Instance Status
C32FCFCACD2E2650E05317279D0A7830 C32FCFCACD312650E05317279D0A7830 HA VERIFY_DG_CONFIG_20210526091058954 Running SYSMAN Running
[oracle@emhost bin]$ ./emcli get_instances | grep -B1 VERIFY_DG_CONFIG_20210526091058954
GUID Execution GUID Type Name Status Owner Instance Status
C32FCFCACD2E2650E05317279D0A7830 C32FCFCACD312650E05317279D0A7830 HA VERIFY_DG_CONFIG_20210526091058954 Succeeded SYSMAN Succeeded
--- View results using GUID = C32FCFCACD2E2650E05317279D0A7830
[oracle@emhost bin]$ ./emcli get_instance_status -instance=C32FCFCACD2E2650E05317279D0A7830 -xml -details -showJobOutput | grep -B50 "Data Guard configuration verification complete."
Processing is 0% complete.
Processing is 0% complete.
Processing is 0% complete.
Initializing
Connected to instance exasydad1x8anz-1nn7a1:XXXXXXX1
Starting alert log monitor...
Updating Data Guard link on database homepage...
Skipping verification of fast-start failover static services check.
Data Protection Settings:
Protection mode : Maximum Performance
Redo Transport Mode settings:
XXXXXXX_PHOENIX: ASYNC
XXXXXXX_SYDNEY: ASYNC
Checking standby redo log files.....Done
(Standby redo log files needed : 4)
Checking Data Guard status
XXXXXXX_PHOENIX : Normal
Write operation in progress
XXXXXXX_SYDNEY : Normal
Checking inconsistent properties
Checking agent status
XXXXXXX_PHOENIX
exaphxad3x8na-kvnxa1.dbexaphoad3.phx.oraclevcn.com ... OK
exaphxad3x8na-kvnxa2.dbexaphoad3.phx.oraclevcn.com ... OK
XXXXXXX_SYDNEY
exasydad1x8anz-1nn7a1.excsad1client.syd.oraclevcn.com ... OK
exasydad1x8anz-1nn7a2.excsad1client.syd.oraclevcn.com ... OK
Checking applied log on XXXXXXX_PHOENIX...OK
Processing completed.
Standby Redo Log Files
Standby redo log files are recommended for all transport modes.
They are required for certain features such as real-time apply and elevated protection modes.
Database Host/Cluster Size (MB) Log File Location Thread
XXXXXXX_PHOENIX Unknown 4000.0 Oracle-managed file 2
XXXXXXX_PHOENIX Unknown 4000.0 Oracle-managed file 1
XXXXXXX_SYDNEY Unknown 4000.0 Oracle-managed file 2
XXXXXXX_SYDNEY Unknown 4000.0 Oracle-managed file 1
--- Insufficient SRLs were create for both primary and standby.
Successfully created the required standby redo log files for all databases.
Successfully resolved the issues detected during verification.
Data Guard configuration verification complete.
$
Example of failure due to BUG or inconsistency for target name.
WARNING:
DB_NAME=ORACLE_SID=YYYYYYY
$ $OMS_HOME/bin/emcli get_targets -targets=rac_database -format=name:csv | grep YYYYYYY
1,Up,rac_database,YYYYYYY.excsad2client.oraclevcn.com
1,Up,rac_database,YYYYYYY_ASHBURN
The below message in verify configuration due to Bug 32252460 in 13.4 and fixed in 14.1 GC
WARNING: Broker name (YYYYYYY) and target name (YYYYYYY.excsad2client.oraclevcn.com) do not match.
Checking standby redo log files.....not checked due to broker name mismatch.
Need to match target name and broker name as a workaround to have emcli create srls.