Additional /datacompare Arguments
Last modified: March 28, 2025
This topic gives 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 clicking Save settings to a command line arguments file.
Arguments
To get more information on switches related to data comparison in the command line interface, you can type:
C:\Program Files\Devart\Compare Bundle for Oracle\dbForge Data Compare for Oracle>datacompare.com /datacompare /?
Below all switches of this option are described, together with usage examples.
Argument | Action and usage |
---|---|
/source |
Defines source database schema for comparison and synchronization in the command line. It is possible to use several options for defining the schema. To connect to a server via Oracle client, type: server:<server_alias> [home:<oracle_home_name>] user:<user_name> password:<pw> mode:[normal/sysdba/sysoper] To connect to a server without using Oracle client (direct connection), type: host:<machine_name> [port:<port_number>] SID:<oracle_service_ID> user:<user_name> password:<password> mode:[normal/sysdba/sysoper] 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> ...] |
/target |
Specifies target database schema for comparison and synchronization in the command line. It is possible to use several options for defining the schema. To connect to a server via Oracle client, type: server:<server_alias> [home:<oracle_home_name>] user:<user_name> password:<pw> mode:[normal/sysdba/sysoper] To connect to a server without using Oracle client (direct connection), type: host:<machine_name> [port:<port_number>] SID:<oracle_service_ID> user:<user_name> password:<password> mode:[normal/sysdba/sysoper] 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> ...] |
/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\Compare Bundle for Oracle\dbForge Data Compare for Oracle>dbforgeoracle.com /datacompare /compfile:"D:\workDir\ODC1vsODC2.dcomp" |
/meobjmask | Excludes 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 . Usage: /meobjmask:<expression/N> |
/micolmask |
Includes 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 .Usage: /micolmask:<expression/N> |
/miobjmask |
Includes 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 .Usage: /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. |
/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\Compare Bundle for Oracle\dbForge Data Compare for Oracle>dbforgeoracle.com /datacompare /compfile:"OSC1vsOSC2.scomp" /sync:"D:\compare_result.sql" Note: If the /sync argument is used without parameters, synchronization with the database is performed at once and changes cannot be reversed. |
/report |
Generates a schema comparison report. If the output file name ends in .html, .xls, or .xml, the file format will be automatically determined based on the extension.Usage: /report:<filepath> |
/reportformat |
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. Usage: /reportformat:<HTML|XLS|CSV> |
/includeobjects |
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. Usage: /includeobjects:<All | Filtered | Diff | SelectForSync> |
/log |
Writes 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\Compare Bundle for Oracle\dbForge Data Compare for Oracle>dbforgeoracle.com /datacompare /compfile:"ODC1vsODC2.scomp" /log:"D:\sync.log |
/copybfiles |
Specifies parameters for the option ‘Physically copy BFILEs’. Usage: /copybfiles dir:<directory_alias> path:<path> |
/lobsviafiles |
Specifies parameters for the ‘Synchronize LOBs data via files’ option . Usage: /lobsviafiles dir:<directory_alias> path:<path> |
/schemas |
Defines schemas to compare. If you don’t, schemas specified in /source and /target will be used. Command usage looks like: /schemas:<source_1>,<target_1>[;<source_2>,<target_2>;...] The following example shows how to compare schemas using connection through client. C:\Program Files\Devart\Compare Bundle for Oracle\dbForge Data Compare for Oracle>dbforgeoracle.com /datacompare /source server:OraServer user:yourusername password:yourpassword /target server:OraServer2 user:yourusername password:yourpassword /schemas:OSC1,OSC2 |
/includeobjects |
/includeobjects:<All|Filtered|Diff|SelectForSync Specifies objects for the report: * All - all objects; * Filtered - filtered objects; * Diff - objects with differences; * SelectForSync - objects selected for synchronization. The option refers specifically to the report generation in the HTML/XLS/XML formats and does not work separately from the /report:<filepath> key. |
/copybfiles |
Sets parameters for the Physically copy BFILEs option. Command line usage looks like: /copybfiles dir:<directory_alias> path:<path> |
/lobsviafiles |
Defines parameters for the ‘Synchronize LOBs data via files’ option. Command line usage looks like: /lobsviafiles dir:<directory_alias> path:<path> |
/activate |
Activates the product with the license key. |
/deactivate |
Deactivates the product. |
Usage Examples
-
Compare data using settings from a file saved earlier:
/datacompare /compfile:"D:\workDir\ODC1vsODC2.dcomp"
-
Compare and synchronize data using connection through the client. Log will be written to the specified file:
/datacompare /source server:OraServer user:yourusername password:yourpassword /target server:OraServer2 user:yourusername password:yourpassword /schemas:ODC1,ODC2 /sync /log:"D:\sync.log"
-
Compare data of the specified schemas and save the synchronization script to the D:\compare_result.sql file; the first connection is created using direct mode, the second connection is established through the client:
/datacompare /source host:oraHost port:1521 SID:orcl user:yourusername password:yourpassword mode:sysdba /target server:OraServer user:yourusername password:yourpassword /schemas:DC1,DC2;ODC1,ODC2 /sync:"D:\compare_result.sql"
-
Compare and synchronize data using settings from the file, do not generate comments in the synchronization script, turn off triggers during synchronization; generate a report to the specified file in the .html format:
/datacompare /compfile:"ODC1vsODC2.dcomp" /nocomments:yes /distrig:yes /report:"report.txt" /reportformat:HTML /sync
-
Compare and synchronize data using settings from a file. Synchronize Lob columns using files:
/datacompare /compfile:"ODC1vsODC2.dcomp" /LobsViaFiles dir:DC2_DIR path:\\oracleHost\TEMP_FOLDER\DB_TARGET\ /sync
-
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:"ODC1vsODC2.dcomp" /report:"report.html" /incdata:Yes /incsettings:Yes
Note
To build the command-line syntax, it’s better to use the Command-line Wizard.
Want to find out more?
Overview
Take a quick tour to learn all about the key benefits delivered by Data Compare for Oracle.
All features
Get acquainted with the rich features and capabilities of the tool in less than 5 minutes.
Request a demo
If you consider employing this tool for your business, request a demo to see it in action.