Importing multiple CDC Replication configurations with a user configuration file

You can import multiple CDC Replication configurations with the dmimportuserconfiguration command.

About this task

The configuration details are sent to an XML configuration file. You can use the dmimportuserconfiguration command to import the XML file that you create with this command into another instance of CDC Replication.

Note: This command does not import encryption profiles, only the encryption profile name. Create encryption profiles with the correct names before you run this command. If you exported with an encryption profile named "Default," when you run the import command the encryption profile that is named "Default" is created automatically. This default profile is set for no encryption.

Procedure

  1. Call the dmexportconfiguration command to create an XML configuration file for an existing instance of CDC Replication.
    This file is referred to as the base XML configuration file.
  2. Make a copy of the base XML configuration file.
    This file is referred to as the user XML configuration file.
  3. Follow these steps to edit the user XML configuration file:
    1. Rename the <config> and </config> element keys to be <userconfig> and </userconfig>.
    2. By default <userconfig> is created with overrideTargetTables set to false. This is to prevent overriding any previous installations. If instances are to be overridden or modified, then change overrideTargetTables to true for all required instances in userConfig xml.
    3. Include these mandatory elements in the user XML configuration file:
      • <name></name> – Instance name; must be unique in the file. If the instance does not yet exist, it is created.
      • <tcpPort></tcpPort> – Port number that this CDC Replication instance uses; must be unique in the file.
      • <dbName></dbName> – Database name that this CDC Replication instance uses.
      • <overrideTargetTables></overrideTargetTables> – If this element is set to true, CDC Replication overrides target metadata tables if another instance with this name exists. If false, the command fails to run if an instance with the same name exists.
    4. Optionally, modify the values of other elements. You can delete nonmandatory elements that you do not want to modify.
    5. To modify username and password elements, provide plain text username and password values. CDC encodes them during import
    6. Optionally, append more than one set of elements to create or modify multiple instances.
  4. Save the user XML configuration file.
  5. Stop the CDC Replication instances that are named in the user XML configuration file.
  6. At a command prompt, start the configuration tool by issuing one of the following commands in the specified directory:
    Windows
    CDC_Replication_installation_directory\bin\dmimportuserconfiguration path-to-base-XML-configuration-file path-to-user-XML-configuration-file [-L locale]
    Linux and UNIX
    CDC_Replication_installation_directory/bin/dmimportuserconfiguration path-to-base-XML-configuration-file path-to-user-XML-configuration-file [-L locale]
    CDC creates temporary instance XMLs based on the number of instances that are mentioned in userConfig xml. There temporary files are created under <cdc_install_directory>/log directory with names InstanceConfigxxxxxx.xml.
  7. Start the CDC Replication instances that are named in the user XML configuration file.