• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to Export and Import Data Guard Broker Configuration in Oracle 19c

by admin

Oracle Database 19c onward, you can export/import the broker metadata configuration to a text file. This post outlines the steps to import or export the broker metadata configuration.

For the purpose of this post we aree using below example configuration:

Data Guard Configuration : 
Primary db_unique_name : prim_db
Standby db_unique_name : stby_db

Exporting broker configuration file

1. First, login into the primary database using dgmgrl:

$ dgmgrl [LOGIN]/[PASSWORD]@prim_db

2. Now export the broker configuration file as “dg_config.xml”:

DGMGRL> export configuration to 'dg_config.xml';
Succeeded.
Note: You cannot specify the directory in which the exported configuration is stored. The broker stores the exported configuration in the “trace” directory (ADR).

The export command will fail if a file of the same name already exists. For example:

DGMGRL> export configuration to 'dg_config.xml';
ORA-16571: Oracle Data Guard configuration file creation failure

3. Confirm if the broker configuration is exported to the trace directory:

$ ls -ltr [ADR_BASE]/rdbms/prim_db/[oracle_sid]/trace/dg_config.xml 
-rw-r--r-- 1 oracle oinstall 4707 July 05 04:23 dg_config.xml

Importing broker configuration file

1. Before importing the configuration file, you must remove the existing broker configuration. An error will occur if the broker configuration already exists. For example:

DGMGRL> import configuration from 'dg_config.xml';
ORA-16504: The Oracle Data Guard broker configuration already exists.

2. The specified file name must exist in the “trace” directory (ADR). Let us first remove the existing broker configuration.

$ dgmgrl [LOGIN]/[PASSWORD]@prim_db
DGMGRL for Linux: Release 19.0.0.0.0 - Production on Sat Aug 17 07:59:23 2019
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.

Welcome to DGMGRL, type "help" for information.
Connected to "prim_db"
Connected as SYSDBA.

DGMGRL> remove configuration;
Removed configuration
DGMGRL>

3. Now import the new configuration which is present in the trace directory. Also, enable the configuration once imported successfully.

DGMGRL> import configuration from 'dg_config.xml';
Succeeded. Run ENABLE CONFIGURATION to enable the imported configuration.
DGMGRL>
DGMGRL> enable configuration;
Enabled.
DGMGRL>

4. Verify the configuration.

DGMGRL> show configuration;

Configuration - [CONFIGURE NAME]

Protection Mode: MaxPerformance
Members:
prim_db - Primary database
stby_db - Physical standby database

Fast-Start Failover: Disabled

Configuration Status:
SUCCESS (status updated 7 seconds ago)

Filed Under: oracle

Some more articles you might also be interested in …

  1. How to Create and Drop Guaranteed restore point in Oracle Data Guard
  2. Common Init.ora Parameters and Unix, Linux Kernel Parameters and Relationship Between Them
  3. How to Enable Fast-Start Failover using Enterprise Manager
  4. How to Monitor SGA Memory on Oracle Pluggable Databases
  5. How to move a datafile from file system to ASM
  6. Oracle Database – Measuring Network Capacity using oratcptest
  7. Log file locations for Enterprise Manager Cloud Control 13c (OMS)
  8. How to get the Values Assigned by Default to a Profile in Oracle Database
  9. Oracle 12c New Feature – Multi-Threaded architecture of processes
  10. How to trace asmcmd command on UNIX/Linux

You May Also Like

Primary Sidebar

Recent Posts

  • raw: command not found
  • raw Command Examples in Linux
  • rankmirrors Command Examples in Linux
  • radeontop: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright