Options used in the command line

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

{option}:[value]

To enable the option, specify: Yes, Y, On, True, or T.

To disable the option, specify: No, N, Off, False, or F.

Note

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

Command-line options for the /schemacompare switch

Each option has both a full and a short name. You can input either name of the desired option into Command Prompt.

Command line option name Alias Option description
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
IncludeComparisonSettings incsettings Includes identical objects into your report
IncludeSyncScript incscript Include synchronization script into sync report
IncludeSyncWarnings incwarn Include synchronization warnings into sync report
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

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