Page tree

Xml configuration file allows you to specify all data compare options and settings. Even though some settings can be set via command line switches, we recommend you specify them in the xml file.

With the xml configuration file you can:

  • Specify databases and login credentials;
  • Define the comparison options;
  • Customize data compare by excluding objects, defining custom keys and where clauses;
  • Specify mapping rules;
  • Specify the files for the synchronization script and logs;
  • Execute the data synchronization script.

The xml file groups the comparison options into the following sections:

SectionDescription

Database
        <LeftDatabase>
        <RightDatabase>

Contains the source and target database (or schema).
Data Compare Options
        <DataCompareOptions>
Contains the data compare options.
Table Mapping Rules
        <TableMappingRules>
Contains the rules that determine how database tables are mapped.
View Mapping Rules
        <ViewMappingRules>
Contains the rules that determine how database views are mapped.
Table Pairs
        <TablePairs>
Contains the pairs of tables that should be mapped manually or pairs that should be excluded.
View Pairs
        <ViewPairs>
Contains the pairs of views that should be mapped manually or pairs that should be excluded.
Command Line Settings
        <CommandLineOptions>
Contains additional data compare settings.

 A typical xml configuration file has the following structure:

<?xml version="1.0" encoding="utf-8" ?>
<DataCompareCmdConfig xmlns="http://www.idera.com/oracle/schemas/datacompare/cmd.xsd">
     <LeftDatabase>
          <ConnectionName>Oracle Schema 1</ConnectionName>
          <ConnectionType>Basic</ConnectionType>
          <Username>HR</Username>
          <Password>********</Password>
          <Host>host-name-or-ip</Host>
          <Service>oracle-service-name</Service>
          <DatabaseSchema>HR</DatabaseSchema>
     </LeftDatabase>
     <RightDatabase>
          <ConnectionName>Oracle Schema 2</ConnectionName>
          <ConnectionType>Basic</ConnectionType>
          <Username>HR_TARGET</Username>
          <Password>********</Password>
          <Host>host-name-or-ip</Host>
          <Service>oracle-service-name</Service>
          <DatabaseSchema>HR_TARGET</DatabaseSchema>
     </RightDatabase>
     <CommandLineOptions>
          <Direction>RightAsLeft</Direction>
          <Synchronize>true</Synchronize>
          <DataScriptFile>SyncScript.sql</DataScriptFile>
          <DataLogFile>SyncScript.log</DataLogFile>
          <ComparisonLogFile>Operational.txt</ComparisonLogFile>
          <ErrorLogName>Error.log</ErrorLogName>
     </CommandLineOptions>
</DataCompareCmdConfig>

  • <LeftDatabase> and <RightDatabase> elements specify the source and the target database or schema.
  • DatabaseSchema element within each database element specifies the Oracle schema.
  • Data compare options are not set. The command line will use the default options.
  • The <CommandLineSettings> element contains the following settings:
    • <Direction>: RightAsLeft. Indicates that data on the right will be modified to match with the data on the left.
    • <Synchronize> true: Indicates that the command line should execute the data synchronization script.
    • <DataScriptFile>. Specifies a file name for data synchronization script.
    • <DataLogFile>. Specifies a file name for data synchronization log.
    • <ComparisonLogFile>. Specifies a file name for data compare operational log.
    • <ErrorLogName>. Specifies a file name for logging the errors that might occur during the comparison.

You can run the command line with a xml configuration file as follows:

Idera.OracleDataCmd <config.xml>

You can validate an xml file as follows:

Idera.OracleDataCmd <config.xml> /v


IDERA ProductsPurchase | Support | Community | Resources | About Us | Legal