In today’s article, I will tell you how to Active Oracle DataGuard Broker.
If you have not installed Data Guard before, you can install it via the link below.
1 | https://dbtut.com/index.php/2022/02/15/oracle-data-guard-installation/ |
1. We activate DataGuard Broker in Primary and Standby databases.
1 | SQL> ALTER SYSTEM SET dg_broker_start=true; |
2. On the primary server, we connect to DGMGRL as follows and save the primary database.
1 2 3 4 5 6 7 | $ dgmgrl sys/<password>@testdb DGMGRL for Linux: Version 11.2.0.4.0 - 64bit Production Copyright (c) 2000, 2009, Oracle. All rights reserved. Welcome to DGMGRL, type "help" for information. Connected. DGMGRL> CREATE CONFIGURATION dg_config AS PRIMARY DATABASE IS testdb CONNECT IDENTIFIER IS testdb; Configuration "dg_config" created with primary database "testdb" |
3. We save the standby database.
1 2 | DGMGRL> ADD DATABASE teststby AS CONNECT IDENTIFIER IS teststby MAINTAINED AS PHYSICAL; Database "teststby" added |
4. The new configurations are activated.
1 2 | DGMGRL> ENABLE CONFIGURATION; Enabled. |
5. We check the configurations as follows.
1 2 3 4 5 6 7 8 9 | DGMGRL> SHOW CONFIGURATION; Configuration - dg_config Protection Mode: MaxPerformance Databases: testdb - Primary database teststby - Physical standby database Fast-Start Failover: DISABLED Configuration Status: SUCCESS |
Primary configuration :
1 2 3 4 5 6 7 8 | DGMGRL> SHOW DATABASE testdb; Database - testdb Role: PRIMARY Intended State: TRANSPORT-ON Instance(s): testdb Database Status: SUCCESS |
Standby configuration :
1 2 3 4 5 6 7 8 9 10 11 12 | DGMGRL> SHOW DATABASE teststby; Database - teststby Role: PHYSICAL STANDBY Intended State: APPLY-ON Transport Lag: 0 seconds (computed 0 seconds ago) Apply Lag: 0 seconds (computed 0 seconds ago) Apply Rate: 0 Byte/s Real Time Query: OFF Instance(s): teststby Database Status: SUCCESS |