Switches used in the command line

Last modified: May 9, 2025

This topic gives a 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 selecting Save settings to a file.

Access available dbForge Studio switches

To access help regarding the available command line arguments for data comparison switches, use the following command:

dbforgemysql.com /datacompare /?

Upon successful execution of this command, the table displaying data comparison will be launched.

Option Value and Usage
compfile Usage: /compfile:<path> Load command line settings from comparison .dcomp project file.
exitcodes Usage: /exitcodes Displays the list of exit codes that can be returned by the command-line process.
IncludeObjects Usage: /includeobjects:<All|Diff|SelectForSync> Specifies the objects that will be included into report: All - all objects; Diff - objects with differences; SelectForSync - objects selected for synchronization.
log Usage: /log:<filepath> Generate comparison log file in the specified directory.
meobjmask Usage: /meobjmask:<expression | No> Exclude objects from the comparison if they match the given expression. To exclude objects from the comparison, specify mask expression. To turn off the option, specify: No, N, Off, False, F.
micolmask Usage: /micolmask:<expression | No> Specifies a custom wildcard or regular expression for columns to be excluded from the comparison. For example, if ModifiedDate, CreatedOn, UpdatedBy is set for this option, the columns with such names as UpdateByCustomer, NotUpdateByUser, RecordCreatedOn, MessageCreatedOnDay, LastModifiedDate, and ProductModifiedDateTime will be excluded from the comparison.
miobjmask Usage: /miobjmask:<expression | No> Include objects to comparison if they match the given expression. To include objects to comparison, specify mask expression. To turn off the option, specify: No, N, Off, False, F.
options Usage: /{option}:[value] Specify the value for comparison or synchronization option. To turn on the option, specify: Yes, Y, On, True, T. To turn off the option, specify: No, N, Off, False, F. Please see the documentation to the default values for the options. You can use this switch as many times as many options you want to specify. See also the Options list for data comparison and the Comparison report.
report Usage: /report:<filepath> Generate data comparison report file. If the output file name has .html, .xls or .csv extension, it’s not necessary to specify the file format - it will be chosen depending on the extension. Please see the documentation to learn more about report formats.
reportformat Usage: /reportformat:<HTML|XLS|CSV> Specify the format of the file comparison report: HTML - a simple HTML file; XLS - a simple Microsoft Excel file; CSV - a simple CSV file. If the format was not specified, it is determined by the extension of the report file.
source Specify source with the following options:       host:<name> database:<db> [port:<port>] user:<name> [password:<pw>] [charset:<charset>] Connects to a live database by specified parameters.       connection:<connection_string> Allow specifying the full connection string with additional parameters.       scriptsfolder:<folderpath> Load database objects from the specified scripts folder.
sync Usage: /sync[:path] Launch database synchronization. If an output file path is specified, the program will generate only a synchronization script.
target Specify target with the following options:       host:<name> database:<db> [port:<port>] user:<name> [password:<pw>] [charset:<charset>] Connects to a live database by specified parameters.       connection:<connection_string> Allow specifying the full connection string with additional parameters.       scriptsfolder:<folderpath> Load database objects from the specified scripts folder.

Options list for data comparison

Below, you will find the options list for data comparison with their full and short command line names.

Full Name Short Name
BulkMaxSize bulkms
CheckConcurrencyUpdates concupd
CheckDifferent chkdiff
CheckIdentical chkequal
CheckOnlyInSource chksource
CheckOnlyInTarget chktarget
CompareTables tables
CompareViews views
ConvertFromArchiveEngine convfromarc
DisableDmlTriggers nodml
DisableForeignKeys nofk
DropCheckConstraints dropcheck
DropKeys dropkeys
ExcludeComments nocomments
ExcludeNewAddedObjects excnewaddedobj
ExcludeObjectsByMask meobjmask
IgnoreCase icase
IgnoreColumnsByMask micolmask
IgnoreComputedColumns micomput
IgnoreEndOfLine ieol
IgnoreInternalSpaces iispaces
IgnoreLeadingSpaces ilspaces
IgnoreLobColumns milob
IgnoreMicroseconds imsec
IgnoreTemporalTableSysColumns isyscol
IgnoreTrailingSpaces itspaces
IgnoreWhiteSpace ispaces
IncludeObjectsByMask miobjmask
IncludeUseDatabase inud
IsEmptyStringEqualsNull emptyeqnull
IsIgnoreTime itime
LimitBulk limbulk
MappingIgnoreCase micase
MappingIgnoreSpaces mispace
MappingIgnoreUnderscores miunder
RoundFloatTypes round
ToleranceInterval tol

Comparison report

Below, you will find the list of comparison report options with their full and short command line names.

Full Name Short Name
AppendTimestampReport tsreport
DifferentPerColumns diffpercolumns
HideUnmodifiedColumns hidecolumns
IncludeComparisonSettings incsettings
IncludeObjectsData incdata
IncludeSyncWarnings incwarnings

Note

The path to the executable file will differ depending on how you have installed the Studio - as a standalone tool or as part of the dbForge Edge bundle. Make sure that you have specified a correct path. If you have installed the Studio as part of dbForge Edge, change the path accordingly:

C:\Program Files\Devart\dbForge Edge\dbForge Studio for MySQL>dbforgemysql.com

For more information on each command-line operation, run the following command and specify the required option value datacompare /option_name /?. For example, datacompare /report /?.

Note

To run the Command Line in Windows 11:

From the Windows taskbar

  • Right-click the taskbar at the bottom of the screen and select Run. Alternatively, select Start or press Windows on the keyboard to open the Start menu.
  • In the Search bar, enter cmd or Command Prompt.
  • Select Command Prompt from the search results.

Using shortcut keys

  • Press Windows + R to open the Run command window.
  • In the window that opens, enter cmd and press Enter.

Available command-line switches

All switches of this option are described below, along with usage examples.

/compfile

Loads command line settings from the comparison project file, *.dcomp. Command usage looks like:

/compfile:<filepath>

Example of using a file with comparison settings, saved earlier:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /datacompare /compfile:"D:\workDir\ODC1vsODC2.dcomp

/groupby

Groups objects in comparison report. Command usage looks like:

/groupby:<none/status/objecttype>

/log

Generates a comparison log to the specified file. Command usage looks like:

/log:<filepath>

The following example shows how to compare schemas using settings from the file and write log to the specified file:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /datacompare /compfile:"ODC1vsODC2.dcomp" /log:"D:\sync.log

/meobjmask

Excludes objects from comparison if they match the given expression by using the /meobjmask argument and specifying the needed expression. To turn the option off, specify No, N, Off, False, F. Command usage looks like:

/meobjmask:<expression/N>

/micolmask

Excludes columns from the comparison if they match the given expression. To exclude columns from the comparison, specify a mask expression. To turn off the option, specify No, N, Off, False, F. Command usage looks like:

/mimask<expression/N>

/miobjmask

Includes objects to comparison if they match the given expression by using the /miobjmask argument and specifying the needed mask expression. To turn the option off, specify No, N, Off, False, F. Command usage looks like:

/miobjmask:<expression/N>

options

Specifies some comparison and synchronization options directly in the command line interface. See the list of available options and learn how to use them in the Options Used in Command Line for /datacompare topic.

/report

/reportformat

Generates schema comparison report in .html or .xls format. If you specify file format in the output file name in the /report switch, it is not necessary to use the /reportformat switch. Commands usage looks like:

/report:<filepath>
/reportformat:<HTML|XLS>

The following example shows how to compare data using settings from a file, generate report to the specified file in the HTML format:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /datacompare /compfile:"ODC1vsODC2.dcomp" /report:"D:\report.txt" /reportformat:HTML

/includeobjects

Selects objects for the report:

  • All - all objects;
  • Filtered - filtered objects;
  • Diff - objects with differences;
  • SelectForSync - objects selected for synchronization.

Commands usage looks like:

/includeobjects:<All|Filtered|Diff|SelectForSync

The option refers specifically to the report generation in the HTML/XLS/XML formats and does not work separately from the /report:<filepath> key.

/source

Defines source database for comparison and synchronization in the command line. It is possible to use several options for defining the database.

To connect to a live database by specified parameters, type:

host:<name> database:<db> [port:<port>] user:<name> [password:<pw>] [charset:<charset>]

To specify full connection string with additional parameters, type:

connection:<connection_string>

To specify the file path to a SQL Server backup file (.bak) or backup files taken from the differential backup:

backup:<filepath> [backup:<filepath> ...]

/sync

Performs schema synchronization from the command line interface. If you specify output file for synchronization, only synchronization script will be generated. Command usage looks like:

/sync[:filepath]

The following example shows how to compare schemas using settings from the file saved before, and save synchronization script:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /datacompare /compfile:"OSC1vsOSC2.dcomp" /sync:"D:\compare_result.sql"

/target

Specifies target database for comparison and synchronization in the command line. It is possible to use several options for defining the schema.

To connect to a live database by specified parameters, type:

host:<name> database:<db> [port:<port>] user:<name> [password:<pw>] [charset:<charset>]

To specify full connection string with additional parameters, type:

connection:<connection_string>

To specify the file path to a SQL Server backup file (.bak) or backup files taken from the differential backup:

backup:<filepath> [backup:<filepath> ...]

Note

To build the command-line syntax, it’s better to use the Command-line Wizard.