Additional /schemacompare Arguments
Last modified: March 28, 2025
This topic gives detailed description of command line switches and examples of their usage.
Arguments
To get more information on switches related to schema comparison in the command line interface, you can type:
C:\Program Files\Devart\Compare Bundle for Oracle\dbForge Schema Compare for Oracle>schemacompare.com /schemacompare /?
Below all switches of this option are described, together with usage examples.
Argument | Action and Usage |
---|---|
/source |
Specifies 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 database schema snapshot file (.snap) that captures the structure of a database in the XML format: snapshot:<filepath> 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 |
Defines 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 database schema snapshot file (.snap) that captures the structure of a database in the XML format: snapshot:<filepath> 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, *.scomp. 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 Schema Compare for Oracle>schemacompare.com /schemacompare /compfile:"D:\workDir\OSC1vsOSC2.scomp" |
/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 Command Line Options for /schemacompare Operation 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 Schema Compare for Oracle>schemacompare.com /schemacompare /compfile:"OSC1vsOSC2.scomp" /sync:"D:\compare_result.sql" |
/report and /reportformat |
Generates schema comparison report in .html or .xls format. If you specify file format in the output file name in the /report switch, it is not necessary to use the /reportformat switch. Commands usage looks like: /report: |
/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. |
/log |
Generates comparison log file in a specified directory. 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 Schema Compare for Oracle>schemacompare.com /schemacompare /compfile:"OSC1vsOSC2.scomp" /log:"D:\sync.log |
/groupby |
Generates comparison reports. use it to group objects in such report. Command usage looks like: /groupby:<none/status/objecttype> The following example shows how to compare schemas using settings from the file, generate comparison report, and group objects in the report by type: C:\Program Files\Devart\Compare Bundle for Oracle\dbForge Schema Compare for Oracle>schemacompare.com /schemacompare /compfile:"OSC1vsOSC2.scomp" /report:"report.txt" /reportformat:HTML /groupby:objecttype |
/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 Schema Compare for Oracle>schemacompare.com /schemacompare /source server:OraServer user:system password:pswd /target server:OraServer2 user:system password:pswd /schemas:OSC1,OSC2" |
/activate |
Activates the product with the license key. |
/deactivate |
Deactivates the product. |
Usage Examples
- Compare schemas using settings from a file saved earlier:
/schemacompare /compfile:"D:\workDir\OSC1vsOSC2.scomp"
- Compare and synchronize schemas using connection through the client. Log will be written to the specified file:
/schemacompare /source server:OraServer user:system password:pswd /target server:OraServer2 user:system password:pswd /schemas:OSC1,OSC2 /sync /log:"D:\sync.log"
- Compare 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:
/schemacompare /source host:oraHost port:1521 SID:orcl user:sys password:manager mode:sysdba /target server:OraServer user:system password:pswd /schemas:SC1,SC2;OSC1,OSC2 /sync:"D:\compare_result.sql"
- Compare and synchronize schemas using settings from the file, ignore case and foreign keys during comparison; generate a report to the specified file in the html format:
/schemacompare /compfile:"OSC1vsOSC2.scomp" /icase:yes /IgnoreForeignKeys:yes /report:"report.txt" /reportformat:HTML /groupby:objecttype /incsettings:T /sync
Note
To build the command-line syntax, it’s better to use the Command-line Wizard.
Was this page helpful?
Want to find out more?
Overview
Take a quick tour to learn all about the key benefits delivered by Schema 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.