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 Studio for MySQL>dbforgemysql.com /schemacompare /?

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

/compfile

This switch is used to load command line settings from the comparison project file, *.scomp. Command usage looks like:

/compfile:<path>

Example of using a file with comparison settings, saved earlier:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /schemacompare /compfile:"D:\workDir\OSC1vsOSC2.scomp"

/groupby

This switch is used when generating 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\dbForge Studio for MySQL>dbforgemysql.com /schemacompare /compfile:"OSC1vsOSC2.scomp" /report:"report.txt" /reportformat:HTML /groupby:objecttype 

/log

Use this switch if you want to generate 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\dbForge Studio for MySQL>dbforgemysql.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

You can generate 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:<filepath>
/reportformat:<HTML|XLS>

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 Studio for MySQL>dbforgemysql.com /schemacompare /compfile:"OSC1vsOSC2.scomp" /report:"report.txt" /reportformat:HTML

/source

You can specify source database for comparison and synchronization in the command line. It is possible to use several options for defining the schema.

To connect to a live database by specified parameters, type:

host:<name> database:<db> [port:<port>] user:<name> [password:<pw>] [charset:<charset>]

To specify full connection string with additional parameters, type:

connection:<connection_string>

To load database project to be compared, type:

dbproject:<projectpath>

/target

You can specify target database for comparison and synchronization in the command line. It is possible to use several options for defining the database.

To connect to a live database by specified parameters, type:

host:<name> database:<db> [port:<port>] user:<name> [password:<pw>] [charset:<charset>]

To specify full connection string with additional parameters, type:

connection:<connection_string>

To load database project to be compared, type:

dbproject:<projectpath>

/sync

You can perform 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[:path]

The following example shows how to compare schemas using settings from the file saved before, and save synchronization script:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /schemacompare /compfile:"OSC1vsOSC2.scomp" /sync:"D:\compare_result.sql"