Options used in the command line

You can select the required options while setting the comparison in the Schema Comparison wizard and generate a file with command-line arguments by clicking Save settings to a command-line arguments file on the Options wizard page. Also, you can set comparison options by using the /option_name:[Y/N] switch in the Command Prompt. Specify either full or short names of the options.

By default, dbForge Schema Compare for MySQL generates a file with command line arguments and writes all comparison and synchronization options into it. Each option is written like the following: /option_name: [Y/N].

You can edit the file to turn on/off the required options. To turn on comparison and synchronization options, edit their values to “Yes”, “Y”, “True”, “T”, or “On”. To turn off the options, change their values to “No”, “N”, “False”, “F”, or “Off”.

Each option has a full and short name. You can type either name of a required option into the Command Prompt instead of editing the file.

With Schema Compare, it is possible to set project configuration options by using the Options switch.

{option}:[value]

Note

You can use this value as many times as many options you want to specify.

Comparison and synchronization options list

Below, you will find the list of comparison and synchronization options with their full and short command line names.

Full Name Short Name Option
AffectedFileReadOnly affectedfile Remove the read-only attribute from the affected files
CheckObjectExistence cexist Check for object existence
DisableDependencyAnalysis disdep Disable dependency analysis
DropCreateOnly dropcreateonly Use DROP and CREATE instead of ALTER
DropCreateOnlyTables dropcreateonlyt Use DROP and CREATE instead of ALTER for tables
ExcludeComments nocomments Exclude comments
ExcludeDependencies edep Exclude dependencies
ForceColumnOrder force Force column order
IgnoreAutoIncrement iautoinc Ignore AUTO_INCREMENT clause
IgnoreAutoIncrementDefinition iautoincremdef Ignore AUTO_INCREMENT table option
IgnoreAvgRowLength iavgrowlen Ignore average low length
IgnoreCheckConstraints icheck Ignore check constraints
IgnoreCollations icollate Ignore collations and character sets
IgnoreColumnDefaultValues icolumndef Ignore column default values
IgnoreColumnOrderInIndexes icolumnordind Ignore column order in indexes
IgnoreComments icomment Ignore comments
IgnoreCommentsOptions icommopt Ignore comments options
IgnoreConstraintsNames icnames Ignore constraint names
IgnoreDataTypesInColumn idtc Ignore data types in column
IgnoreDefiner idefiner Ignore DEFINER caluse
IgnoreDropIndexes idropi Ignore indexes present only in Target
IgnoreEndsClause iends Ignore ENDS clause
IgnoreForeignKeyActions ifkacts Ignore foreign keys actions ON UPDATE and ON DELETE
IgnoreForeignKeys ifk Ignore foreign keys
IgnoreFullTextIndexes iftindex Ignore fulltext indexes
IgnoreIndexes iindex Ignore indexes
IgnoreIndexesNames iinames Ignore indexes names
IgnoreNotNullConstraints inotnull Ignore NOT NULL for a column
IgnoreParserErrors iparsererrors Ignore parser errors
IgnorePartitions ipart Ignore partitions
IgnorePermissions iperm Ignore permissions
IgnorePrimaryKeys ipk Ignore primary keys
IgnoreRowFormat irowformat Ignore row format table option
IgnoreSpatialIndexes ispindex Ignore spatial indexes
IgnoreSqlSecurity issec Ignore SQL SECURITY clause
IgnoreStartsClause istarts Ignore STARTS clause
IgnoreSynonymForFunctions ifuncsyn Ignore synon for functions in source objects
IgnoreTableDMLTriggers itdmltrig Ignore table DML triggers
IgnoreTableEngine iengine Ignore table engine
IgnoreTriggerFireOrder ifire Ignore firing order for DDL and DML triggers
IgnoreWhiteSpace ispaces Ignores white spaces (new lines, tabs, spaces, etc.) during comparison and synchronization
IgnoreCase icase Ignore case in symbols for non-key columns
MappingIgnoreCase micase Ignore case in object names when mapping them
MappingIgnoreSpaces mispace Ignore spaces in object names druing mapping and comparing
MappingSimilar msim Associate column names having similar name options

Comparison report options list

Below, you will find the list of comparison report options with their full and short command line names.

Full Name Short Name Option
AppendTimestampReport tsreport Generate comparison reports with a timestamp
ScriptDiffsStyle scriptstyle Usage: /ScriptDiffsStyle:<removeadd|cross>
Specify the style of displaying script differences in the comparison report:
removeadd: Highlight removed and added lines
cross: Apply strikethrough to removed symbols and highlight added symbols
IncludeComparisonSettings incsettings Includes identical objects into your report
IncludeSyncScript incscript Includes a synchronization script into your report
IncludeSyncWarnings incwarnings Include synchronization warnings into your report

Usage examples

  • Compare databases using settings from a file saved earlier:
/schemacompare /compfile:"D:\workDir\SC1vsSC2.scomp"
  • Compare and synchronize schemas using the connection through the client. Log will be written to the specified file:
schemacompare /source server:MySQLServer1 user:root password:password database:db1 /target server:MySQLServer2 user:root password:password database:db2 /sync /log:"D:\sync.log"

Note

Make sure to replace MySQLServer1, MySQLServer2, root, password, db1, and db2 with the actual values for your MySQL servers and databases.

  • Compare specified databases and save the synchronization script to the D:\compare_result.sql file:
/schemacompare /source:MySQLServer1/db1/user=root/password=password /target:MySQLServer2/db2/user=root/password=password /sync:"D:\compare_result.sql"
  • Compare and synchronize databases using the settings from the file, ignore case and foreign keys during comparison; generate a report to the specified file in the html format:
/schemacompare /compfile:"SC1vsSC2.scomp" /icase:yes /IgnoreForeignKeys:yes /report:"report.txt" /reportformat:HTML /groupby:objecttype /incsettings:T /sync

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Schema Compare for MySQL.
Request a demo

Request a demo

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