Specifies the operations, executed in the console 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:
|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”.|
The scope is a qualified name of the object. It has the following format:
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
User Defined Type (User Defined Types)
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:
|Preferences||Optional. Specifies preferences inside the selected scope.|
|MatchingPreferences||Optional. Specifies matching preferences inside selected scope.|
|TypeMapping||Optional. Specifies types mapping inside selected scope.|
|ManualMapping||Optional. Specifies the manual mapping of metadata elements inside selected scope.|
|Export||Optional. Specifies export parameters.|
The only ManualMapping element is ObjectPair, which specifies a pair of mapped objects for selected scope.
Supported ObjectPair elements are listed in the table:
|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:
|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%DbBestDatabaseCompareSuiteExport”. 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”.|