Options used in the command line

By default, dbForge Schema Compare for MySQL generates a file with command line arguments and records all comparison and synchronization options into it. Each option is displayed in the format:

/option_name:[Y/N]

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

Each option has both a full name and a short name. Instead of editing the file, you can specify the desired option directly in the Command Prompt.

See below the list of options with their full and short command line names.

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 row 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 clause
IgnoreDropIndexes idropi Ignore indexes present only in Target
IgnoreEndsClause iends Ignore ENDS clause
IgnoreForeignKeyActions ifkacts Ignore cascading referential integrity constraints for foreign keys
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
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 synonym for functions in source objects
IgnoreTableDMLTriggers itdmltrig Ignore table DML triggers
IgnoreDropDMLTriggers idropt Ignore dropped DML triggers in target
IgnoreTableEngine iengine Ignore table engine
IgnoreTriggerFireOrder ifire Ignore firing order for DDL and DML triggers
IgnoreWhiteSpace ispaces Ignore white spaces (new lines, tabs, spaces, etc.) during comparison and synchronization
IgnoreCase icase Ignore case when comparing values in the object’s body
MappingIgnoreCase micase Ignore case in object names when mapping them
MappingIgnoreSpaces mispace Ignore spaces in object names during 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 Include comparison settings into the report
IncludeSyncScript incscript Include 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 server:MySQLServer1 user:root password:password database:db1 /target server:MySQLServer2 user:root password:password database:db2 /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