Let DataGuard Broker Do ALL The Work

Tags:
Google Cloud Platform,
Linux,
Site Reliability Engineering,
Technical Track,
Articles,
Cloud,
Open Source,
Google Cloud Platform (Gcp),
Devops
What's the reason for implementing DataGuard Broker? It does all the work. eg. Test system has been shutdown and upon startup, encountered error as shown. [code] [oracle@ol7-121-dg2 ~]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.2.0 Production on Tue Feb 11 16:15:41 2020 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to an idle instance. SQL> startup; ORACLE instance started. Total System Global Area 1610612736 bytes Fixed Size 2924928 bytes Variable Size 520097408 bytes Database Buffers 1073741824 bytes Redo Buffers 13848576 bytes Database mounted. ORA-10458: standby database requires recovery ORA-01196: file 1 is inconsistent due to a failed media recovery session ORA-01110: data file 1: '/u01/oradata/CDB1_STBY/datafile/o1_mf_system_h1x6ofd1_.dbf' SQL> [/code] Shutdown database and startup mount. [code] SQL> shutdown immediate; ORA-01109: database not open Database dismounted. ORACLE instance shut down. SQL> startup mount; ORACLE instance started. Total System Global Area 1610612736 bytes Fixed Size 2924928 bytes Variable Size 520097408 bytes Database Buffers 1073741824 bytes Redo Buffers 13848576 bytes Database mounted. SQL> exit Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options [/code] Check DataGuard status using dgmgrl. Note: standby recovery was automatically started. [code] [oracle@ol7-121-dg2 ~]$ dgmgrl / DGMGRL for Linux: Version 12.1.0.2.0 - 64bit Production Copyright (c) 2000, 2013, Oracle. All rights reserved. Welcome to DGMGRL, type "help" for information. Connected as SYSDG. DGMGRL> show configuration Configuration - my_dg_config Protection Mode: MaxPerformance Members: cdb1 - Primary database cdb1_stby - Physical standby database Fast-Start Failover: DISABLED Configuration Status: SUCCESS (status updated 34 seconds ago) DGMGRL> show database cdb1_stby Database - cdb1_stby Role: PHYSICAL STANDBY Intended State: APPLY-ON Transport Lag: 0 seconds (computed 0 seconds ago) Apply Lag: (unknown) Average Apply Rate: (unknown) Real Time Query: OFF Instance(s): cdb1 Database Status: SUCCESS DGMGRL> show database cdb1_stby Database - cdb1_stby Role: PHYSICAL STANDBY Intended State: APPLY-ON Transport Lag: 0 seconds (computed 0 seconds ago) Apply Lag: 0 seconds (computed 0 seconds ago) Average Apply Rate: 2.12 MByte/s Real Time Query: OFF Instance(s): cdb1 Database Status: SUCCESS DGMGRL> show database cdb1_stby Database - cdb1_stby Role: PHYSICAL STANDBY Intended State: APPLY-ON Transport Lag: 0 seconds (computed 0 seconds ago) Apply Lag: 0 seconds (computed 0 seconds ago) Average Apply Rate: 333.00 KByte/s Real Time Query: OFF Instance(s): cdb1 Database Status: SUCCESS DGMGRL> exit [/code] Enable Active DataGuard [code] [oracle@ol7-121-dg2 ~]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.2.0 Production on Tue Feb 11 16:21:41 2020 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options SQL> alter database open read only; Database altered. SQL> exit Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options [/code] Check DataGuard status using dgmgrl. [code] [oracle@ol7-121-dg2 ~]$ dgmgrl / DGMGRL for Linux: Version 12.1.0.2.0 - 64bit Production Copyright (c) 2000, 2013, Oracle. All rights reserved. Welcome to DGMGRL, type "help" for information. Connected as SYSDG. DGMGRL> show database cdb1_stby Database - cdb1_stby Role: PHYSICAL STANDBY Intended State: APPLY-ON Transport Lag: 0 seconds (computed 0 seconds ago) Apply Lag: 0 seconds (computed 0 seconds ago) Average Apply Rate: 301.00 KByte/s Real Time Query: ON Instance(s): cdb1 Database Status: SUCCESS DGMGRL> exit [oracle@ol7-121-dg2 ~]$ [/code] In conclusion, when implementing DataGuard, it might be advantageous to consider, and implement, DataGuard Broker.