Database Compare Suite™

Operation element

Specifies the operations, executed in the command-line interface scenario. The scenario without any operation is empty and doesn’t make sense. So, the operation element is mandatory and unbounded. It can be used together with the ExecuteSQL element.

The supported attributes for the operation element are listed in the following table:

Attribute Comment
name Required. The name of the operation. Currently the following operations are supported: “Schema Comparison”, “Schema Synchronization”, “Data Comparison”, “Detailed Data Comparison”, “Fast Data Comparison”, “Data Synchronization”, “Data Migration”, “Settings Comparison”.
sourceScope Required.
targetScope Required.

The scope is a qualified name of the object. It has the following format:

[type] path_to_object_in_database

where type is a metadata type or category.

The following values of type are supported:

  • Server (should be obligatorily specified for “Settings Comparison” operation). Cannot be used in other operations
  • Database
  • Schema (Schemas)
  • Table (Tables)
  • View (Views)
  • Function (Functions)
  • Procedure (Procedures)
  • Package (Packages)
  • Module (Modules)
  • Synonym (Synonyms)
  • Sequence (Sequences)
  • Default (Defaults)
  • Rule (Rules)
  • Assembly (Assemblies)
  • Aggregate Function
  • Domain (Domains)
  • User Defined Type (User Defined Types)
  • Join Index
  • Index (Indices)
  • Macros (Macroses)
  • Operator (Operators)
  • External Table (External Tables)
  • Shared Library (Shared Libraries)

The path_to_object_in_database parameter is a path in SQL syntax. For example:

Tables DB1.dbo – all tables in the schema “dbo” in the database “DB1”;

DB1.dbo.Table1 – object with name “Table1” in the schema “dbo” in the database “DB1”;

table DB1.dbo.Table1 – table with name “Table1” in the schema “dbo” in the database “DB1” following.

Supported child elements are listed in the table:

Child element Comment
Preferences Optional. Specifies preferences inside the selected scope.
TypeMapping Optional. Specifies types mapping inside selected scope.
Export Optional. Specifies export parameters.

Supported ObjectPair elements are listed in the table:

Attribute Comment
sourcePath Required. Specifies a path to the object on the left (source) side.
targetPath Required. Specifies the path to the object on the right (target) side.
action Optional, “map” is the default value. The following actions are supported: “map”, “unmap”, “exclude”. For actions “unmap” and “exclude” you can specify only one path (another path should be specified by the empty string). The option “unmap” means that the object will not have a corresponding pair in the opposite database environment, but the object will be included in the operation. The option “exclude” excludes the pair of objects from the operation.

The Export element defines the output path for the export file. It can be one of the following types:

  • XML – for the Schema Comparison operation;
  • CSV – for the Schema Comparison, Data Comparison, Detailed Data Comparison, Fast Data Comparison, Data Migration and the Settings Comparison operations;
  • SQL – for the Schema Synchronization operation.

Setting up the export properties changes the processing of the Schema Synchronization operation result. If an export element is specified, the generated script will be stored in a file. Otherwise, the generated script will be executed on the target database.

Here are the supported attributes:

Attribute Comment
path Optional, “auto” is the default value. This is the path to an export file. If the attribute is not specified, the name of an export file will be generated automatically in the directory “\ProgramData\DbBest\DatabaseCompareSuite\Export”. The file name format is “<operation_name> Result (<leftObject> vs <rightObject>) <current_time_stamp>”.
append Optional. The attribute defines that the export file should be appended instead of creating a new one. Possible values: “true”, “false”.

Didn’t find the answer?

You can report problems, ask questions or share ideas for improvements on our email [email protected].