Step by Step Data Guard Broker Configuration in Oracle 19c


If you want to manage an Oracle data guard easily, then you should use a data guard broker.

The Oracle Data Guard broker is a distributed management framework that automates and centralizes the creation, maintenance, and monitoring of Data Guard configurations.

In my configuration, I have already created a Data Guard. You can check this post to see how I created it.

BCN is the primary database and PARIS is the standby database.

In the commands below you can remove the sid=’*’ if you don’t have a RAC database and you should be good to go.

Continue reading “Step by Step Data Guard Broker Configuration in Oracle 19c”

How to Find Primary Database From Standby in Oracle

photo of grass field

If you have an Oracle data guard and you want to know the role of each database then you can follow this guide to get more details about the environment.

You can run these queries in the primary or the standby database indistinctively.

This first query gives a general overview of both primary and standy databases.

set lines 132
column current_scn format 99999999999999999999

select * from v$dataguard_config;

DB_UNIQUE_NAME                 PARENT_DBUN                    DEST_ROLE                   CURRENT_SCN     CON_ID
------------------------------ ------------------------------ ----------------- --------------------- ----------
XT001NFB                       NONE                           PRIMARY DATABASE          4686633244816          0
XT001NSB                       XT001NFB                       PHYSICAL STANDBY          4686633244861          0

If you want to know the role of the database you are connected to:

select name, open_mode, database_role from v$database;

--------- -------------------- ----------------

If you want to get even more info, then show this parameter:

show parameter log_archive_config

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_config                   string      dg_config=(XT001NSB,XT001NFB)

If you have data guard broker installed for your data guard (which I recommend), then you can check the configuration like that.

dgmgrl /

DGMGRL for Linux: Version - 64bit Production

Copyright (c) 2000, 2013, Oracle. All rights reserved.

Welcome to DGMGRL, type "help" for information.
Connected as SYSDG.
DGMGRL> show configuration;

Configuration - DG_XT001

  Protection Mode: MaxAvailability
  XT001NFB - Primary database
    XT001NSB - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 55 seconds ago)

I hope this was helpful.