Switches used in the command line

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

Available command-line switches

To get more information on switches related to data comparison in the command line interface, you can type:

C:\Program Files\Devart\dbForge Studio for MySQL>dbforgemysql.com /datacompare /?

Note

The path to the executable file will differ depending on how you have installed the Studio - as a standalone tool or as part of the dbForge Edge bundle. Make sure that you have specified a correct path. If you have installed the Studio as part of dbForge Edge, change the path accordingly:

C:\Program Files\Devart\dbForge Edge\dbForge Studio for MySQL>dbforgemysql.com

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, *.dcomp. 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 /datacompare /compfile:"D:\workDir\ODC1vsODC2.dcomp

/groupby

This switch groups objects in comparison report. Command usage looks like:

/groupby:<none/status/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 /datacompare /compfile:"ODC1vsODC2.dcomp" /log:"D:\sync.log

/meobjmask

You can exclude objects from comparison if they match the given expression by using the /meobjmask argument and specifying the needed expression. To turn the option off, specify No, N, Off, False, F. Command usage looks like:

/meobjmask:<expression/N>

/micolmask

Use this switch to exclude columns from the comparison if they match the given expression. To exclude columns from the comparison, specify a mask expression. To turn off the option, specify No, N, Off, False, F. Command usage looks like:

/mimask<expression/N>

/miobjmask

You can include objects to comparison if they match the given expression by using the /miobjmask argument and specifying the needed mask expression. To turn the option off, specify No, N, Off, False, F. Command usage looks like:

/miobjmask:<expression/N>

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 Options Used in Command Line for /datacompare topic.

/report

/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 data 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 /datacompare /compfile:"ODC1vsODC2.dcomp" /report:"D:\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 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>

/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 /datacompare /compfile:"OSC1vsOSC2.dcomp" /sync:"D:\compare_result.sql"

/target

You can specify target 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>

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Studio for MySQL.
All Features

All features

Get acquainted with the rich features and capabilities of the Studio in less than 5 minutes.
Request a demo

Request a demo

If you consider employing the Studio for your business, request a demo to see it in action.
Ready to start using dbForge Studio for MySQL?