Additional /datacompare Arguments

This topic gives detailed description of command line switches and examples of their usage.

You can select the required options while setting the comparison in the Data Comparison wizard and generate a file with command line arguments by clicking Save settings to a

Arguments

To get more information on switches related to data comparison in the command line interface, you can type:

C:\Program Files\Devart\dbForge Data Compare for MySQL>datacompare.com /datacompare /?

Command-line Switches

Argument Command Usage Description
/compile /compfile:<path> Loads command line settings from the comparison project file - *.dcomp.
/groupby /groupby:<none/status/objecttype> Groups objects in the comparison report.
/log /log:<filepath> Generates a comparison log file in the specified directory.
/meobjmask /meobjmask:<expression/N> Excludes objects from comparison if they match a given expression. To exclude objects from the comparison, specify a mask expression. To turn the option off, specify No, N, Off, False, or F.
/micolmask /mimask<expression/N> Excludes columns from the comparison if they match a given expression. To exclude columns from the comparison, specify a mask expression. To turn the option off, specify No, N, Off, False, or F.
/miobjmask /miobjmask:<expression/N> Includes objects to comparison if they match a given expression. To include objects to the comparison, specify a mask expression. To turn the option off, specify No, N, Off, False, or F.
options /option_name: [Y/N] Specifies some comparison or synchronization options directly in the command line interface. See the list of available options and learn how to use them in Options Used in Command Line for /datacompare. To turn the option off, specify No, N, Off, False, or F.
/report
/reportformat
/report:<filepath>
/reportformat:<HTML|XLS|CSV>
Generates a schema comparison report in .html, .xls, or .csv file formats.
Note: If you specify a file format in the output file name in the /report switch, it is not neccessary to use the /reportformat switch.
/source host:<name> database:<db> [port:<port>] user:<name> [password:<pw>] [charset:<charset>] Connects to a live source database by specified parameters.
/source connection:<connection_string> Allows specifying the full connection string with additional parameters.
/sync /sync[:path] Allows synchronizing a schema from the command line interface. If an output file path is specified, the program will generate only a synchronization script.
/target host:<name> database:<db> [port:<port>] user:<name> [password:<pw>] [charset:<charset>] Connects to a live target database by specified parameters.
/target connection:<connection_string> Allows specifying the full connection string with additional parameters.

Usage Examples

  • Compare data using settings from the file saved earlier:
C:\Program Files\Devart\dbForge Data Compare for MySQL>datacompare.com /datacompare / compfile:"D:\workDir\ODC1vsODC2.dcomp"
  • Compare schemas using settings from the file and write log to a specified file:
C:\Program Files\Devart\dbForge Data Compare for MySQL>datacompare.com /datacompare / compfile:"ODC1vsODC2.dcomp" /log:"D:\sync/log"
  • Compare data using settings from the file, generate a report to the specified file in the HTML format:
C:\Program Files\Devart\dbForge Data Compare for MySQL>datacompare.com /datacompare / compfile:"ODC1vsODC2.dcomp" /report:"D:\report.txt" /reportformat:HTML
  • Compare schemas using using settings from the file saved before, and save a synchronization script:
C:\Program Files\Devart\dbForge Data Compare for MySQL>datacompare.com /datacompare / compfile:"OSC1vsOSC2.dcomp" /sync:"D:\compare_result.sql"