Scenario 15: Exporting and Importing a Broker Configuration File

The broker configuration can be exported into a text file in the trace directory. The configuration can be recreated by importing the exported configuration metadata.

For this scenario, save the broker configuration in the trace directory by exporting the configuration metadata into a text file and then restore the configuration by importing the previously exported text file.

  1. Exporting a Broker Configuration

  2. Importing a Broker Configuration

Exporting a Broker Configuration

Use the EXPORT CONFIGURATION command to export the metadata contained in the broker configuration file to a text file.

The directory in which the broker configuration file is stored must be accessible to the Oracle server process.

  1. Connect to the primary database.
    DGMGRL> CONNECT sys@south_sales
    Password: password
    Connected to "South_Sales"
    Connected as SYSDBA.
    
  2. Export the broker configuration.

    The following command exports the broker configuration and stores it in a file named myconfig.txt in the trace directory.

    DGMGRL> EXPORT CONFIGURATION TO 'myconfig.txt';
    Succeeded.

    Note:

    If a file with the name myconfig.txt already exists in the trace directory, the following error is generated:
    DGMGRL> EXPORT CONFIGURATION TO 'myconfig.txt';
    ORA-16527: Unable to create output file for broker configuration metadata.
    

    To create a new configuration file with the same name as an existing file, first either delete or rename the existing file.

Importing a Broker Configuration

Use the IMPORT CONFIGURATION command to import the broker configuration metadata that is stored in a text file into your current broker configuration.

  1. Connect to the primary database.
    DGMGRL> CONNECT sys@south_sales
    Password: password
    Connected to "South_Sales"
    Connected as SYSDBA.
    
  2. Import the broker configuration metadata that is stored in the file named myconfig.txt in the trace directory into your current broker configuration.
    DGMGRL> IMPORT CONFIGURATION FROM 'myconfig.txt';
    Succeeded.
    

    Run ENABLE CONFIGURATION to enable the imported configuration. Then run ENABLE FAST_START FAILOVER to re-enable Fast-Start Failover.