Atikh's DBA blog
  • Home
  • Oracle
  • MySQL
  • MongoDB
  • PostgreSQL
  • Snowflake
  • About Me
  • Contact Us

Oracle Dataguard Broker Configuration (DGMGRL)

 Atikh Shaikh     dataguard, oracle     No comments   

Data Guard Broker is a command-line interface that makes managing primary and standby databases easy. DBA can use a single command to switch from primary and standby and vice versa.

Several pre-defined commands can be used to manage Data Guard. Data guard configuration is one of the steps in the primary and standby database setup.

 

The steps below will describe the configuration and other uses

 

Step 1: Add the configuration file to both the databases (primary/standby)

 

Configuration files save the status of the primary and standby database

 

SQL> show parameter DG_BROKER_START

 

NAME                                 TYPE        VALUE

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

dg_broker_start                      boolean     TRUE

 

SQL> ALTER SYSTEM SET DG_BROKER_START=FALSE;

 

System altered.

 

SQL> alter system set dg_broker_config_file1='/u01/oracle/prim_db/dguard/dg1_prim_db.cfg' scope=both;

 

System altered.

 

SQL> alter system set dg_broker_config_file2='/u01/oracle/prim_db/dguard/dg2_prim_db.cfg' scope=both;

 

System altered.

 

Perform similar steps on the Standby side as well

 

Oracle dataguard Broker

Step 2: Set up of DG_BROKER_START parameter on the primary and standby databases

 

SQL> ALTER SYSTEM SET DG_BROKER_START=TRUE SCOPE=BOTH;

 

System altered.

 

SQL> show parameter DG_BROKER_START

 

NAME                                 TYPE        VALUE

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

dg_broker_start                      boolean     TRUE

 

Step 3: Set up local listener parameters on the primary and the standby.

 

Primary-> alter system set local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST =prim_server.pfizer.com)(PORT = 1522))' scope=both;

 

Standby-> alter system set local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST =standby_server.pfizer.com)(PORT = 1522))' scope=both;

 

Step 4: DGMGRL configuration

 

Connect to primary db through dgmgrl

 

prim_server.pfizer.com-prim_db $ dgmgrl /

DGMGRL for Linux: Release 19.20.0.0.0 - Production on Wed Apr 09 04:52:13 2025

 

Copyright (c) 1982, 2023, Oracle and/or its affiliates.  All rights reserved.

 

Welcome to DGMGRL, type "help" for information.

Connected to "prim_db"

Connected as SYSDG.

DGMGRL> create configuration prim_db_conf as Primary Database is 'prim_db' connect identifier is prim_db.pfizer.com;

Configuration "prim_db_conf" created with primary database "prim_db"

DGMGRL>

DGMGRL> ADD DATABASE 'standby_db' AS CONNECT IDENTIFIER IS standby_db.pfizer.com MAINTAINED AS PHYSICAL;

Database "standby_db" added

DGMGRL>

DGMGRL> enable configuration;

Enabled.

DGMGRL> show configuration;

 

Configuration - prim_db_conf

 

  Protection Mode: MaxPerformance

  Members:

  prim_db - Primary database

  standby_db - Physical standby database

 

Fast-Start Failover: DISABLED

 

Configuration Status:

SUCCESS   (status updated 4 seconds ago)

 

Output should be SUCCESS; if not, we need to rectify the issues.

 

 

Step 5:  Monitor and manage and Data Guard Broker configuration

 

Check configuration status:

DGMGRL> show configuration;

 

Check configuration details of each database

DGMGRL> show database 'prim_db';

DGMGRL> show database 'standby_db';

 

Enable or Disable configuration for individual database

DGMGRL> enable database 'prim_db';

DGMGRL> disable database 'standby_db';

 

Useful Commands in DGMGRL

 

CREATE CONFIGURATION

ADD DATABASE

EDIT DATABASE

SHOW DATABASE

ENABLE CONFIGURATION

SWITCHOVER TO

FAILOVER TO

  • Share This:  
  •  Facebook
  •  Twitter
  •  Instagram
  •  Pin
  •  linkedin
  •  reddit
Email ThisBlogThis!Share to XShare to Facebook
Newer Post Older Post Home

0 comments:

Post a Comment

Author

Atikh Shaikh
View my complete profile

Categories

  • MongoDB (18)
  • Oracle 12c (30)
  • Oracle12cR2 New Feature (3)
  • PostgreSQL (20)
  • RMAN (10)
  • Snowflake (8)
  • mysql (23)
  • oracle (74)

Blog Archive

  • ►  2018 (38)
    • ►  November (25)
    • ►  December (13)
  • ►  2019 (33)
    • ►  January (15)
    • ►  February (6)
    • ►  March (2)
    • ►  April (5)
    • ►  May (5)
  • ►  2020 (5)
    • ►  April (1)
    • ►  May (2)
    • ►  July (2)
  • ►  2021 (8)
    • ►  June (3)
    • ►  July (3)
    • ►  August (1)
    • ►  December (1)
  • ►  2022 (33)
    • ►  May (3)
    • ►  June (10)
    • ►  July (3)
    • ►  August (4)
    • ►  September (8)
    • ►  October (3)
    • ►  November (2)
  • ►  2023 (14)
    • ►  February (1)
    • ►  April (5)
    • ►  May (2)
    • ►  June (1)
    • ►  September (1)
    • ►  October (1)
    • ►  December (3)
  • ►  2024 (5)
    • ►  January (2)
    • ►  March (3)
  • ▼  2025 (6)
    • ►  March (1)
    • ▼  April (3)
      • Data pump (expdp/impdp) troubleshooting in Oracle ...
      • Oracle 23ai : Use of NOVALIDATE Constraints in IMPDP
      • Oracle Dataguard Broker Configuration (DGMGRL)
    • ►  May (2)

Popular Posts

  • ORA-29283: invalid file operation: unexpected "LFI" error (1509)[29437]
    I was trying to export the schema in my windows PC, it got stuck with below error    C:\Users\shaik\Videos\technodba exp>expdp userid...
  • PostgreSQL : How to get data directory location for PostgreSQL instance
    Sometimes, you start working on a PostgreSQL instance but forget about the data directory, here we will discuss different methods to know th...
  • Oracle 23ai : Use of NOVALIDATE Constraints in IMPDP
    While performing impdp operations in the Oracle database, Oracle performs validation checks for every constraint on the imported table, that...
  • ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES
    In previous articles, we have learned about user creation and grants  in MySQL in detail, but there are a few privileges called global priv...
  • Oracle Dataguard Broker Configuration (DGMGRL)
    Data Guard Broker is a command-line interface that makes managing primary and standby databases easy. DBA can use a single command to switch...

Labels

oracle Oracle 12c mysql PostgreSQL MongoDB oracle 19c Oracle23c oracle19c Orale PDB-CDB oracle12c python AWS Oracle ASM Virtualbox pluggable database storage engine

Pages

  • Disclaimer
  • Privacy Policy

Follow TechnoDBA

Copyright © Atikh's DBA blog | Powered by Blogger