Options Used in Command Line for /datacompare

By default, dbForge Data Compare for MySQL generates a file with command-line arguments and records all comparison and synchronization options into it. Each option is displayed in the format:

/option_name:[Y/N]

You can edit the file to turn on/off the required options. To turn on comparison and synchronization options, set their values to “Yes”, “Y”, “True”, “T”, or “On”. To turn off the options, use “No”, “N”, “False”, “F”, or “Off”.

Each option has both a full name and a short name. Instead of editing the file, you can specify the desired option directly in the Command Prompt.

See below the list of options with their full and short command line names.

Options List

Full name Short name Description
BulkInsert bulk Specify if the multirow INSERT should be used to increase the data insert performance. When cleared, the single row INSERT is used.
BulkSize bsize Specify the bulk size limit.
CheckConcurrencyUpdates concupd Supplement UPDATE and DELETE commands with non-key values in the WHERE condition and add IF NOT EXISTS statement before the INSERT command.
CheckDifferent chkdiff Include different records into the comparison result.
CheckIdentical chkequal Include identical records into the comparison result.
CheckOnlyInSource chksource Include into the comparison result only those records that exist in the Source.
CheckOnlyInTarget chktarget Include into the comparison result only those records that exist in the Target.
CompareTables tables Include tables into comparison.
CompareViews views Include views into comparison.
ConvertFromArchiveEngine convfromarc Convert Archive Engine to InnoDB for the UPDATE and DELETE operations possibility.
DisableDmlTriggers nodml When selected, DML triggers are disabled at the beginning of the synchronization. After the synchronization, DML triggers are re-enabled. The option is applicable to tables.
DisableForeignKeys nofk When selected, foreign keys will be dropped at the beginning of the synchronization. After the synchronization, foreign keys will be restored.
DropKeys dropkeys Drop primary keys and indexes before synchronization.
ExcludeComments nocomments Exclude comments from the synchronization script.
ExcludeNewAddedObjects excnewaddedobj Compare only those tables and views that are explicitly included into the project (.dcomp).
ExcludeObjectsByMask meobjmask Exclude tables or views from comparison by specifying a custom wildcard expression for their names.
IgnoreBlobColumns miblob Ignore BLOB columns during comparison.
IgnoreCase icase Ignore case when comparing the values of the TEXT, TINYTEXT, MEDIUMTEXT, LONGTEXT, and VARCHAR datatypes.
IgnoreColumnsByMask micolmask Exclude columns from comparison by specifying a custom wildcard expression for their names.
IgnoreComputedColumns micomput Ignore computed columns during comparison.
IgnoreEndOfLine ieol Ignore end of line characters during comparison and synchronization.
IgnoreLeadingSpaces ilspaces Ignore white spaces in the beginning of the strings during comparison and synchronization.
IgnoreMicroseconds imsec Ignore microseconds in TIME, DATETIME, and TIMESTAMP datatypes.
IgnoreTrailingSpaces itspaces Ignore white spaces in the end of the strings during comparison and synchronization.
IgnoreWhiteSpace ispaces Ignore white spaces.
IncludeDifferencesPerColumns incdiffcols Include differences per columns.
IncludeObjectsByMask miobjmask Include tables or views from comparison by specifying a custom wildcard expression for their names.
IncludeOnlyColumnsWithChanges inccolswchanges Include into synchronization only columns with changes.
IncludeSyncScript incscript Include synchronization script.
IncludeUseDatabase inud Add the USE DATABASE statement to the script.
IsEmptyStringEqualsNull emptyeqnull Treat NULL and EMPTY STRING as the same value for CHAR and VARCHAR values when comparing Source and Target.
IsIgnoreTime itime Ignore time for DATETIME fields during comparison, e.g. values ‘1995-09-29 03:14:15’ and ‘1995-09-29 22:14:06’ will be considered as equal.
MappingIgnoreCase micase Ignore case in objects names when mapping.
MappingIgnoreSpaces mispace Ignore white spaces in objects names when mapping.
MappingIgnoreUnderscores miunder Ignore underscores in object names when mapping.
RoundFloatTypes round Specify the number of digits after the decimal point.
ToleranceInterval tol Specify the module of difference between the values of source and target, if the tolerance interval does not exceed the specified value, the values are considered equivalent.
UseCommitMode commit Insert the COMMIT statement after each user-defined number of DML statements.

Comparison report options list

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

Full Name Short Name Option
AppendTimestampReport tsreport Generate comparison reports with a timestamp.
DifferentPerColumns diffpercolumns Display the number of differences per column
HideUnmodifiedColumns hidecolumns Hide the columns containing no differences
IncludeComparisonSettings incsettings Include comparison settings into the synchronization report.
IncludeObjectsData incdata Include objects data into the synchronization report.
IncludeSyncWarnings incwarnings Include the comparison or synchronization warnings in the comparison report, if any

Usage examples

  • Compare data using settings from a file saved earlier:
/datacompare /compfile:"D:\workDir\MySQLvsMySQL.dcomp"
  • Compare and synchronize data using the connection through the client. Log will be written to the specified file:
/datacompare /source host:MySQLServer1 user:sa password:psw database:db1 /target host:MySQLServer2 user:sa password:pswd database:db2 /sync /log:"D:\sync.log"
  • Compare specified databases and save the synchronization script to the D:\compare_result.sql file:
/datacompare /source host:MySQLServer1 database:db1 user:sa password:pswd /target host:MySQLServer2 database:db2 user:sa password:pswd /sync:"D:\compare_result.sql"
  • Compare and synchronize databases using the settings from the file, ignore case and computed columns during comparison; generate a report to the specified file in the html format:
/datacompare /compfile:"MySQL1vsMYSQL2.dcomp" /icase:yes /IgnoreComputedColumns:yes /report:"report.txt" /reportformat:HTML /sync