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.
To access help regarding the available command-line arguments, use the following command:
dbforgepostgresql.com /?

For more information on each command-line operation, run the following command and specify the required option value: dbforgepostgresql.com /option_name /?. For example, dbforgepostgresql.com /datacompare /?.
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.
dbforgepostgresql.com [/argfile:path] [/option_name1[:value | [parameter1:value parameter2:value ..]] /option_name2 ..]
The first argument for dbforgepostgresql.com is usually an operation switch, which indicates the specific action you want to perform using the application.
Launches data comparison.
| Parameter | Description |
|---|---|
/compfile |
Usage: /compfile:<path>. Loads the command-line settings from a comparison project (.dcomp) file. |
/exitcodes |
Lists possible exit codes that can be returned by the command-line process. |
| includeobjects | Usage: /includeobjects:<All|Filtered|Diff|SelectForSync>. Specifies the objects that will be included in the report: All - all objects; Filtered - Filtered objects; Diff - objects with differences; SelectForSync - objects selected for synchronization. |
/log |
Usage: /log:<filepath>. Generates comparison log file in the specified directory. |
/report |
Usage: /report:<filepath>. Generates data comparison report file. If the output file name has .html, .xls, or .xml extension, it’s not necessary to specify the file format—the format is determined by the file extension. Please see the documentation to learn more about report formats. |
/reportformat |
Usage: /reportformat:<HTML|XLS|CSV>. Specifies 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 |
Specifies source with the following options: |
Usage: host:<name> database:<db> [user:<name>] [password:<pw>] Connects to a live database using specified parameters. If ‘user’ is not specified, the system’s integrated security is used. |
|
Usage: connection:<connection_string> Allows specifying the full connection string with additional parameters. |
|
/sync |
Usage: /sync[:<filepath>] Launches database synchronization. If an output file path is specified, the program will generate only a synchronization script. |
/target |
Specifies target with the following options: |
Usage: host:<name> database:<db> [user:<name>] [password:<pw>] Connects to a live database using specified parameters. If ‘user’ is not specified, the system’s integrated security is used. |
|
Usage: connection:<connection_string> Allows specifying the full connection string with additional parameters. |
|
/options |
Usage: /{option}:[value]. Specifies 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. You can use this switch multiple times to specify several options. |
1. Compare data using settings from a file saved earlier:
/datacompare /compfile:"D:\workDir\DC1vsDC2.dcomp"
2. Compare and synchronize data using a connection string. To write a log to the specified file, use: /log:”D:\sync.log”.
/datacompare /source connection:"Connection Lifetime=120;Host=pgSqlHost;Port=5435;Database=db1;User ID=yourusername;Password=yourpassword;Pooling=False" /target connection:"Connection Lifetime=120;Host=pgSqlHost2;Port=5436;Database=db2;User ID=yourusername;Password=yourpassword;Pooling=False" /sync /log:"D:\sync.log"
3. To compare data of the specified databases and save the synchronization script to the file, use: /sync:"D:\compare_result.sql"
/datacompare /source host:db port:5440 user:yourusername password:yourpassword database:db1 /target host:db2 port:5440 user:yourusername password:yourpassword database:db2 /sync:"D:\compare_result.sql"
4. Compare and synchronize data using settings from the file, do not generate comments in the synchronization script, generate a report to the specified file in the HTML format:
/datacompare /compfile:"DC1vsDC2.dcomp" /nocomments:yes /report:"report.html" /reportformat:HTML /sync
5. Compare data and generate data report using settings from a file. Comparison and data-writing settings for different objects will be included in the report.
/datacompare /compfile:"DC1vsDC2.dcomp" /report:"report.html" /incdata:Yes /incsettings:Yes
Note
To build the command-line syntax, it’s better to use the Command-line Wizard.