Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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" ?>
<SqlDataCompareCmdConfig <DataCompareCmdConfig xmlns="http://www.xsqlsoftwareidera.com/oracle/schemas/datacompare/xSQLDataCompareCmdSchemacmd.xsd">
     <LeftDatabase>
<SqlServer>(local)</SqlServer>
<DatabaseName>DB_Test1</DatabaseName>
<TrustedConnection>true</TrustedConnection>
</LeftDatabase>
<RightDatabase>
<SqlServer>(local)</SqlServer>
<DatabaseName>DB_Test2</DatabaseName>
<Username>username</Username>
<Password>password</Password>
</RightDatabase>
<CommandLineOptions>
<Synchronize>true</Synchronize>
<DataScriptFile>script.sql</DataScriptFile>
<DataLogFile>script.log</DataLogFile>
<ComparisonLogFile>log.txt</ComparisonLogFile>
<ErrorLogName>error.log</ErrorLogName>
</CommandLineOptions>
</SqlDataCompareCmdConfig>
     <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 referred to as the left and the right database respectively.or schema.
  • DatabaseSchema element within each database element specifies the Oracle schema.
  • Data No explicit 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 synchronize the target database by executing execute the data synchronization script. This setting forces command line to make permanent changes in the target database
    • <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:

IderaDataCmd Idera.OracleDataCmd <config.xml>

You can validate an xml file as follows:

IderaDataCmd Idera.OracleDataCmd <config.xml> /v

...


Excerpt

Total compare from data to schema with IDERA Comparison Toolset. Learn more > >

...