For 19c data guard broker, you may check the post: How to Configure 19c Data Guard Broker.
If you have ever used the broker to switchover, failover, switch apply instance, on and off transportation service or apply service, or fast-start failover, you would never miss the manual command. Therefore, the data guard broker is a nice-to-have function.
Before configuring the data guard broker, you must make sure two things:
- A static listener is added for the broker.
- The password files on 4 nodes are all the same.
We have done the above two things at step (02/14), if you are not familiar with these, you can check (02/14) for details.
Now, let's configure the broker.
- Make sure that both databases are started with spfile.
- Configure several initialization parameters on both databases. On primary database.
- Configure the broker via DGMGRL.
SQL> alter system set DG_BROKER_START=false scope=memory;
SQL> alter SYSTEM SET DG_BROKER_CONFIG_FILE1='+data/compdb/dr1primdb.dat';
SQL> alter SYSTEM SET DG_BROKER_CONFIG_FILE2='+data/compdb/dr2primdb.dat';
SQL> alter system set DG_BROKER_START=true scope=both;
On standby database.
SQL> alter system set DG_BROKER_START=false scope=memory;
SQL> alter SYSTEM SET DG_BROKER_CONFIG_FILE1='+data/compdb/dr1standb.dat';
SQL> alter SYSTEM SET DG_BROKER_CONFIG_FILE2='+data/compdb/dr2standb.dat';
SQL> alter system set DG_BROKER_START=true scope=both;
[oracle@primary01 ~]$ dgmgrl /
...
DGMGRL> CREATE CONFIGURATION 'COMPDR' AS PRIMARY DATABASE IS 'primdb' CONNECT IDENTIFIER IS 'primdb';
Configuration "COMPDR" created with primary database "primdb"
DGMGRL> SHOW CONFIGURATION VERBOSE;
Configuration - COMPDR
Protection Mode: MaxPerformance
Databases:
primdb - Primary database
Fast-Start Failover: DISABLED
Configuration Status:
DISABLED
DGMGRL> ENABLE CONFIGURATION;
Enabled.
DGMGRL> ADD DATABASE standb AS CONNECT IDENTIFIER IS standb MAINTAINED AS PHYSICAL;
Database "standb" added
DGMGRL> ENABLE DATABASE standb;
Enabled.
DGMGRL> SHOW CONFIGURATION VERBOSE;
Configuration - COMPDR
Protection Mode: MaxPerformance
Databases:
primdb - Primary database
standb - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS
DGMGRL> SHOW DATABASE primdb;
Database - primdb
Role: PRIMARY
Intended State: TRANSPORT-ON
Instance(s):
primdb1
primdb2
Database Status:
SUCCESS
DGMGRL> SHOW DATABASE standb;
Database - standb
Role: PHYSICAL STANDBY
Intended State: APPLY-ON
Transport Lag: 0 seconds
Apply Lag: 0 seconds
Real Time Query: OFF
Instance(s):
standb1
standb2 (apply instance)
Database Status:
SUCCESS
The broker has been configured.