Atikh's DBA blog
  • Home
  • Oracle
  • MySQL
  • MongoDB
  • PostgreSQL
  • Snowflake
  • About Me
  • Contact Us
Showing posts with label dataguard. Show all posts
Showing posts with label dataguard. Show all posts

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

Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Instagram
  •  Pin
  •  linkedin
  •  reddit
Older Posts Home

Author

Atikh Shaikh
View my complete profile

Categories

  • MongoDB (18)
  • Oracle 12c (30)
  • Oracle12cR2 New Feature (3)
  • PostgreSQL (21)
  • 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 (7)
    • ►  March (1)
    • ►  April (3)
    • ►  May (2)
    • ▼  August (1)
      • PostgreSQL : Tablespaces

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...
  • 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...
  • RMAN Disk backup and List or Report RMAN Backup
    In this post we are going to discuss RMAN disk backup and how to list the same. consider database name is :ASGARD We will see example ho...
  • RMAN Backup of Container and Pluggable Database in 19c/21c/23c
    In multitenant architecture, there are two databases involved, container database and pluggable database. To manage RMAN backups of these da...
  • Aggregation Function in MySQL
    There are number of functions available in MySQL library, in this particular article we will  discuss aggregation function Aggregation  fu...

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