Command-line tool: Introduction

Main Features

Command line utility is a data comparison and synchronization tool designed for execution in Windows command line.

Command line utility allows you to:

  • perform synchronization by schedule
  • merge the synchronization procedure into a larger internal automation process.

Command line utility is distributed as part of the SQL Examiner Suite toolset (Professional edition).

Using Command Line Utility

To pass parameters to the command line utility, you can use one of the following ways (each being preferable in a specific scenario): Project file, Configuration file, or Command line parameters.

1 Project File

Brief description

Project file created in the GUI version of the software provides the most comprehensive set of features and is compatible with data sources of all types. Parameters are stored in a text file (*.seproj or *.sdeproj). File name is passed as a parameter when running the command line utility.

Common scenario of use: configure all necessary parameters in the GUI version of the software, save the Project file, then pass the Project file as a parameter to the command line tool, for example:

SQLDECmd.exe /project:MyProject.sdeproj
Note: In the current version, the format of the configuration file is not documented.

Advantages

  • All features of the utility are supported
  • Ability to configure parameters and save them into a Project file using the GUI version of the software

Drawbacks

  • It is not possible to create and configure the file using third-party software or manually because the format is not documented

2 Configuration File

Brief description

Configuration file provides the ability to specify connection parameters and actions in XML form convenient for viewing and editing. Parameters are stored in a *.config file in XML format. File name is passed as a parameter when running the command line utility.

Note 1: Prior to SQL Examiner Suite 2014, an old configuration file format was used. Now, the format has changed. The old format is supported for backward compatibility.
Note 2: The format is completely documented. For details refer to Configuration File Format.

Advantages

  • Convenient form for viewing and editing
  • All features of the utility are supported
  • Configuration files for versions prior to 2014 are supported

Drawbacks

  • Requires creation of a file: manually or automatically

3 Command Line Only

Brief description

Command line only is the simplest way of running command line utility. No additional files are used to store parameters. Parameters are passed directly in the command prompt upon execution of the command line utility.

Advantages

  • No additional files required
  • Can be used in a combination with Project file or Configuration file

Drawbacks

  • Less convenient for editing (as compared to Project file or Configuration file)
  • There are limitations for use:
    • SQL Examiner & SQL Data Examiner
      • The length of the command line is limited (from … to …), therefore it is not always possible to pass many parameters
      • Schema mapping is not supported
    • SQL Data Examiner only
      • No way to define filters (WHERE clause)
      • No table/object mapping
      • Comparison of queries is not supported
      • No way to determine synchronization order
      • Custom data sources are not supported

Notes

When using Project file or Configuration file, you can extend the project file (configuration file) by using command line parameters. On exception (when the same parameter is specified in both project file and command line), the value in command line has the priority over the one in the project file.

Example:

SQLDECmd.exe /project:MyPrj.sdeproj /server2:MyServer /database2:Northwind /WinAuth2

No matter which target database is specified in the project file, we connect to the Northwind database on the MyServer database server instance using Windows authentication.

Examples

Examples of using SQL Examiner 2014 and SQL Data Examiner 2014 command line utilities with Project file, Configuration file, and Command line parameters are available in the Examples section.

  • Product: SQL Examiner, SQL Data Examiner
  • Edition: Professional
  • Version: All

Related Articles

Compare and synchronize databases by a schedule (version 2015 and higher)

Compare and synchronize databases by a schedule (version 2012 and earlier)

Do not see what you are looking for?
Please submit a support request