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 execute with the application.
Launch data comparison.
| Parameter | Description |
|---|---|
/compfile |
Usage: /compfile:<path>. Loads command line settings from comparison .dcomp project 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 into 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 - it will be chosen depending on the 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: server:<name> database:<db> [user:<name>] [password:<pw>] Connects to a live database by 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: server:<name> database:<db> [user:<name>] [password:<pw>] Connects to a live database by 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 as many times as many options you want to specify. |
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 server:db port:5440 user:yourusername password:yourpassword database:db1 /target server: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.txt" /reportformat:HTML /sync
5. Compare data and generate data report using settings from a file. Comparison and data writing settings of the different objects will be included into 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.