Additional /schemacompare Arguments

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\dbForge Schema Compare for MySQL>schemacompare.com /schemacompare /?

Below all switches of this option are described, together with usage examples.

Argument Action and Usage
/compfile /compfile:<path>
This switch is used to load command line settings from the comparison project file, *.scomp.
Example of using a file with comparison settings, saved earlier:
C:\Program Files\Devart\dbForge Schema Compare for MySQL>schemacompare.com /schemacompare /compfile:"D:\workDir\OSC1vsOSC2.scomp"
/groupby /groupby:<none/status/objecttype>
This switch is used when generating comparison reports. Use it to group objects in such report.
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\dbForge Schema Compare for MySQL>schemacompare.com /schemacompare /compfile:"OSC1vsOSC2.scomp" /report:"report.txt" /reportformat:HTML /groupby:objecttype
/log /log:<filepath>
Use this switch if you want to generate comparison log file in a specified directory.
The following example shows how to compare schemas using settings from the file and write log to the specified file:
C:\Program Files\Devart\dbForge Schema Compare for MySQL>schemacompare.com /schemacompare /compfile:"OSC1vsOSC2.scomp" /log:"D:\sync.log
options You can specify 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.
report and reportformat /report:<filepath>
/reportformat:<HTML|XLS|XML|XMLFOREXCEL>
You can generate schema comparison report in .html, .xls, and .xml 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:
The following example shows how to compare schemas using settings from a file, generate report to the specified file in the HTML format:
C:\Program Files\Devart\dbForge Schema Compare for MySQL>schemacompare.com /schemacompare /compfile:OSC1vsOSC2.scomp /report:report.txt /reportformat:HTML
/source Specifies source with the following options:
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.
connection:<connection_string>
Allows specifying the full connection string with additional parameters.
snapshot:<filepath>
Loads a database from the specified snapshot file.
backup:<filepath> setid:<GUID>
Loads a database backup from one or several files. To specify multiple backup files, you should specify the backup:path parameter as many times as many files you have. The “setid” parameter specifies unique backup set.
scriptsfolder:<folderpath>
Loads database objects from the specified scripts folder.
/target Specifies target with the following options:
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.
connection:<connection_string>
Allows specifying the full connection string with additional parameters.
snapshot:<filepath>
Loads a database from the specified snapshot file.
backup:<filepath> setid:<GUID>
Loads a database backup from one or several files. To specify multiple backup files, you should specify the backup:path parameter as many times as many files you have. The setid parameter specifies unique backup set.
scriptsfolder:<folderpath>
Loads database objects from the specified scripts folder.
/sync /sync[:path]
You can perform schema synchronization from the command line interface. If you specify output file for synchronization, only synchronization script will be generated.
The following example shows how to compare schemas using settings from the file saved before, and save synchronization script:
C:\Program Files\Devart\dbForge Schema Comare for SQL Server>schemacompare.com /schemacompare /compfile:"OSC1vsOSC2.scomp" /sync:"D:\compare_result.sql"