Command-line options

By default, dbForge Data Compare for PostgreSQL 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.

Comparison and synchronization options

The table provides comparison and synchronization options with their full and short command-line names.

Full name Short name Description
BulkInsert bulk Uses multi-row INSERT statements to improve data insertion performance and increase the batch size limit.
CheckConcurrencyUpdates concupd Prevents accidental data overwrites by adding non-key conditions to the WHERE clause of UPDATE and DELETE statements, and by using SELECT ... WHERE NOT EXISTS checks before INSERT statements.
CheckDifferent chkdiff Includes different records into comparison results. The records can then be selected for synchronization.
CheckIdentical chkequal Includes identical records in comparison results.
CheckOnlyInSource chksource Includes only source records into comparison results. The records can then be selected for synchronization.
CheckOnlyInTarget chktarget Includes only target records into comparison results. The records can then be selected for synchronization.
CompareTables tables Compares tables and includes them in comparison results.
CompareViews views Compares views and includes them in comparison results.
DisableDmlTriggers nodml Disables DML triggers at the beginning of synchronization and re-enables them after synchronization completes. The option applies to tables and views.
DisableForeignKeys nofk Drops foreign keys at the beginning of synchronization and restores them after synchronization completes.
DisableRules norules Drops rules at the beginning of synchronization and restores them after synchronization completes. The option applies to ON INSERT, ON UPDATE, and ON DELETE rules only.
DropCheckConstraints dropcheck Drops the CHECK and NOT NULL constraints at the beginning of synchronization and restores them after synchronization completes.
DropKeys dropkeys Drops primary keys, indexes, and unique constraints at the beginning of synchronization and restores them after synchronization completes.
Note: Primary keys, indexes, and unique constraints used as comparison keys are not dropped.
ExcludeComments nocomments Excludes comments from a synchronization script.
ExcludeNewAddedObjects excnewaddedobj Compares only tables and views explicitly included in the saved project (.dcomp).
ExcludeObjectsByMask meobjmask Excludes tables or views from comparison based on a custom wildcard or regular expression.
ExecuteAsSingleTransaction tran Executes a synchronization script in a single transaction. If an error occurs during execution, all database changes are rolled back.
IgnoreCase icase Ignores the case of CHAR, CHARACTER VARYING, and TEXT columns. The option doesn’t affect key comparison columns.
IgnoreColumnsByMask micolmask Excludes columns from comparison based on a custom wildcard or regular expression.
IgnoreComputedColumns micomput Excludes computed columns from comparison.
IgnoreEndOfLine ieol Ignores all carriage return and line feed characters during comparison. The option applies to CHAR, VARCHAR, CHARACTER, CHARACTER VARYING, and TEXT columns. It doesn’t affect key comparison columns.
Note: Using the option with TEXT may slow down comparison.
IgnoreInternalSpaces iispaces Ignores spaces, tabs, and other non-printable characters inside a string during comparison. The option applies to CHAR, VARCHAR, CHARACTER, CHARACTER VARYING, and TEXT columns. It doesn’t affect key comparison columns.
Note: Using the option with TEXT may slow down comparison.
IgnoreLeadingSpaces ilspaces Ignores leading spaces, tabs, and other non-printable characters in a string during comparison. The option applies to CHAR, VARCHAR, CHARACTER, CHARACTER VARYING, and TEXT. It doesn’t affect key comparison columns.
Note: Using the option with TEXT may slow down comparison.
IgnoreLobColumns milob Excludes LOB columns from comparison. The option applies to XML, JSON(B), TEXT, BYTEA, CHARACTER VARYING, BIT, and BIT VARYING data types longer than 8,000.
IgnoreSerialColumns miserial Ignores serial columns during comparison and synchronization.
IgnoreTrailingSpaces itspaces Ignores trailing spaces, tabs, and other non-printable characters during comparison. The option applies to CHAR, VARCHAR, CHARACTER, CHARACTER VARYING, and TEXT columns. It doesn’t affect key comparison columns.
Note: Using the option with TEXT may slow down comparison.
IgnoreWhiteSpace ispaces Ignores whitespace characters during comparison of stored procedures and functions. Original whitespaces in script object bodies are preserved during synchronization.
IncludeObjectsByMask miobjmask Compares only tables or views that match a specified wildcard or regular expression mask.
IsEmptyStringEqualsNull emptyeqnull Treats NULL and EMPTY STRING as the same value.
IsIgnoreTime itime Ignores the time component of DATETIME values during comparison. The option applies to TIMESTAMP.
MappingIgnoreCase micase Ignores lower and upper case differences in object names when mapping them.
MappingIgnoreSpaces mispace Ignores spaces in object names when mapping them.
MappingIgnoreUnderscores miunder Ignores underscores in object names when mapping them.
RoundFloatTypes round Rounds float types up to 3 digits. The option applies to DECIMAL, NUMERIC, REAL, and DOUBLE PRECISION. It doesn’t affect key columns.
ToleranceInterval tol Specifies the maximum allowed difference (absolute value) between source and target values. If the difference doesn’t exceed this value, the values are considered equal. The option applies to SMALLINT, INTEGER, BIGINT, DECIMAL, NUMERIC, REAL, and DOUBLE PRECISION data types. It doesn’t affect key columns.

Comparison report options

Full name Short name Description
AppendTimestampReport tsreport Adds a timestamp to the folder name of a generated comparison report.
DifferentPerColumns diffpercolumns Displays the number of differences per column.
HideUnmodifiedColumns hidecolumns Excludes columns with no differences.
IncludeComparisonSettings incsettings Includes comparison and synchronization settings in a comparison report.
IncludeObjectsData incdata Includes object data in a comparison report.
IncludeSyncWarnings incwarnings Includes comparison or synchronization warnings in the report, if any.

Usage examples

  • Compare data using settings from a file saved earlier:
/datacompare /compfile:"D:\workDir\PgSQLvsPgSQL.dcomp"
  • Compare and synchronize data using the connection through the client. Log will be written to the specified file:
/datacompare /source host:PgSQLServer1 user:sa password:psw database:db1 /target host:PgSQLServer2 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:PgSQLServer1 database:db1 user:sa password:pswd /target host:PgSQLServer2 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:"PgSQL1vsPgSQL2.dcomp" /icase:yes /IgnoreComputedColumns:yes /report:"report.txt" /reportformat:HTML /sync