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 turn on the option, specify: Yes, Y, On, True, T.

To turn off the option, specify: No, N, Off, False, F.

Note:

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

Command line option name Alias Option description
CompareDatabaseProperties cdbp Compare database properties
DecryptEncryptedObjects decrypt Decrypt encrypted objects
DisableDependencyAnalysis disdep Disable database dependencies analysis
ForceColumnOrder force Force column order
IgnoreAuthorization iauth Ignore authorization on schema objects
IgnoreBoundRulesDefaults iboundruldef Ignore bound rules and defaults
IgnoreCase icase Ignore case
IgnoreChangeTracking itracking Ignore CHANGE_TRACKING clauses and statements
IgnoreCheckConstraints icheck Ignore check constraints
IgnoreClrDataTypesInColumn icdtc Ignore CLR datatypes in columns
IgnoreCollations icollate Ignore collations
IgnoreComments icomment Ignore comments
IgnoreConstraintsNames icnames Ignore constraints’ names
IgnoreConstraintSystemNames icsn Ignore constraints’ system names
IgnoreDatabaseExtendedProperties idbprop Ignore database extended properties
IgnoreDatabaseInSynonyms idbsyn Ignore database and sever names in synonyms
IgnoreDatabaseObjectExtendedProperties iobjprop Ignore database object extended properties
IgnoreDataCompression idatacompression Ignore DATA COMPRESSION
IgnoreDataTypesInColumn idtc Ignore data types in column
IgnoreDDLTriggerState iddltstate Ignore state of DDL triggers
IgnoreDefaultCollations idefcollate Ignore default column collations
IgnoreDefaultConstraints idefault Ignore default constraints
IgnoreDMLTriggerState idmltstate Ignore state of DML triggers
IgnoreDropDMLTriggers idropt Ignore DML and INSTEAD OF triggers present only in Target
IgnoreDropIndexes idropi Ignore indexes present only in Target
IgnoreEventNotificationOnQueues ievent Ignore event notification on queues
IgnoreFilegroupsPartitionSchemes istorage Ignore filegroups and partitioned schemas/functions
IgnoreForeignKeyActions ifkacts Ignore foreign keys actions ON UPDATE and ON DELETE
IgnoreForeignKeys ifk Ignore foreign keys
IgnoreFullTextCatalogPath iftpath Ignore full-text catalog path
IgnoreFullTextSearch isearch Ignore full-text search
IgnoreIdentity iidentity Ignore identity on columns
IgnoreIdentitySeedIncrementValues iseed Ignore identity seed and increment values
IgnoreIndexColumnsSortOrder iicso Ignore sort direction (ASC/DESC) for index columns
IgnoreIndexes iindex Ignore indexes
IgnoreIndexesNames iinames Ignore indexes names
IgnoreIndexPageAndRowLock iprlock Ignore PAGE LOCKS and ROW LOCKS for indexes and constraints
IgnoreInsteadOfTriggers iotrig Ignore INSTEAD OF triggers
IgnoreKeywordReduction ired Ignore keyword reduction
IgnoreLockEscalation ils Ignore LOCK_ESCALATION
IgnoreLogins ilogin Ignore logins, certificates, asymmetric keys for users
IgnoreNextFilegroups inextfg Ignore next filegroups
IgnoreNocheck inocheck Ignore NOCHECK
IgnoreNotForReplication ireplication Ignore NOT FOR REPLICATION
IgnoreNotNullConstraints inotnull Ignore NOT NULL for a column
IgnoreObjectNamesInDefinitions ion Ignore object names in definintions
IgnorePadIndexAndFillfactor ipiff Ignore PAD INDEX and FILLFACTOR for indexes and constraints
IgnoreParserErrors iparsererrors Ignore parser errors
IgnorePermissions iperm Ignore permissions
IgnorePrimaryKeys ipk Ignore primary keys
IgnoreQuotedIdentifierAndANSINulls iquotansi Ignore QUOTED IDENTIFIERS and ANSI NULLS
IgnoreReplicatedProcedures irproc Ignore replication procedures
IgnoreReplicatedRoles irrole Ignore replication roles
IgnoreReplicatedSchemas irschem Ignore replication schemas
IgnoreReplicatedTables irept Ignore replicated tables
IgnoreReplicationTriggers irtrig Ignore replication triggers
IgnoreSemicolons isc Ignore semicolons
IgnoreSequenceMax iseqmax Ignore sequence max value
IgnoreSequenceMin iseqmin Ignore sequence min value
IgnoreSequenceStart iseqstart Ignore sequence start value
IgnoreSignatures isign Ignore signatures
IgnoreStatistics istat Ignore statistics
IgnoreStatisticsNorecompute isnr Ignore STATISTICS, NORECOMPUTE for indexes and constraints
IgnoreTableDMLTriggers itdmltrig Ignore table DML triggers
IgnoreTemporalHistoryTableName ihistoryname Ignore history tables names
IgnoreTriggerFireOrder ifire Ignore firing order for DDL and DML triggers
IgnoreTSQLtFramework itsqlt Ignore tSQLt framework and unit tests
IgnoreUniqueKeys iuk Ignore unique keys
IgnoreUserDefaultLanguage iudeflang Ignore user DEFAULT_LANGUAGE
IgnoreUserDefaultSchema iuds Ignore user DEFAULT SCHEMA
IgnoreUserPermissions iuperm Ignore users’ permissions
IgnoreWhiteSpace ispace Ignore white space
IgnoreWithEncryption iwenc Ignore WITH ENCRYPTION
IgnoreWithNocheck iwnocheck Ignore WITH NOCHECK state on constraints
IgnoreWithOptionOrder iwith Ignore WITH option order
MappingIgnoreCase micase Ignore cases in object names druing mapping and comparing
MappingIgnoreSpaces mispace Ignore spaces in object names druing mapping and comparing
MappingSimilar msim Associate column names having similar name options
PopulateFullTextIndexes populate Populate full-text indexes
QuoteObjectNames quote Quote object names with square brackets
UserDataTypesToSystem udttosys Convert user data types into SQL Server system data types
AddingErrorHandling adderrorhandle Add error handling statements
AddTransactionIsolationLevel addtransiso Set transaction isolation level
AddWithEncryption addwithencr Add WITH ENCRYPTION
AddWithNocheck addnocheck Add constraints and keys to tables using WITH NOCHECK
CheckObjectExistence cexist Check for object existence
CommentDdlForKeysCertificates commentkeys Comment DDL statements for signatures, certificates, asymmetric and symmetric keys
DeployDatabaseInSingleUserMode depsingl Synchronize database in the single user mode
DisableDdlTriggers noddl Disable DDL triggers during synchronization
DropCreateOnly dropcreateonly Use DROP and CREATE instead of ALTER
DropCreateOnlyAssemblies dropcreateonlya Use DROP and CREATE instead of ALTER for assemblies
DropCreateOnlyTables dropcreateonlyt Use DROP and CREATE instead of ALTER for tables
ExcludeComments nocomments Exclude comments
ExcludeDependencies edep Exclude dependencies
ExecuteAsSingleTransaction tran Execute a synchronization script as a single transaction
IncludePrintComments iprint Include print comments in the deployment script
IncludeUseDatabase inud Include USE clause to the script
RefreshViews rview Exclude dependencies from a synchronization script
SynchronizeAsmViaFiles asmviafiles Synchronize assemblies via files
UseSchemaNamePrefix fullnames Names of objects include schema name
UseSchemaTransfer ust Use ALTER SCHEMA TRANSFER expression to transfer tables between schemas
VerifyTableData verify Verify table data using checksum
IncludeComparisonSettings incsettings Includes identical objects into your report
IncludeIdenticalObjects incident Includes comparison options into your report. This option is available only for HTML reports
IncludeSyncScript incscript Includes synchronization script into your report
IncludeSyncWarnings incwarn Includes synchronization warnings into your report
SelectedObjectsOnly selobjonly Includes objects selected for synchronization 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 connection through the client. Log will be written to the specified file:
/schemacompare /source server:SqlServer1 user:sa password:sa database:db1 /target server:SqlServer2 user:sa password:sa database:db2 /sync /log:"D:\sync.log"
  • Compare specified databases and save the synchronization script to the D:\compare_result.sql file:
/schemacompare /source server:SqlServer1 user:sa password:sa database:db1 /target server:SqlServer2 user:sa password:sa database:db2 /sync:"D:\compare_result.sql"
  • Compare and synchronize databases using 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