SQL Compare 13

Options used in the command line


You can set project configuration options by using the /Options switch.For example, by default comparisons are not case-sensitive; to specify case-sensitive comparisons use:

/Options:CaseSensitiveObjectDefinition

To specify multiple options, separate the options using commas:

/Options:<option1>,<option2>,<option3>

If you don't explicitly set any options, the defaults are used.

Default options:

  • DecryptPost2KEncryptedObjects
  • IgnoreFillFactor
  • IgnoreWhiteSpace
  • IncludeDependencies
  • IgnoreFileGroups
  • IgnoreUserProperties
  • IgnoreWithElementOrder
  • IgnoreDatabaseAndServerName

If you want to use these defaults with additional options, specify the default argument and the additional options. For example:

/Options:Default,CaseSensitiveObjectDefinition,IgnoreComments

If you don't specify the default argument, only the options you do specify apply.To specify no options, use the none argument.Further options are detailed below.

AddDatabaseUseStatement

Alias: adus

Adds a USE statement at the top of the SQL deployment script.

AddWithEncryption

Alias: we

Adds WITH ENCRYPTION when stored procedures, functions, views, and triggers are included in the deployment

If you use ADD ENCRYPTION on a SQL Server 2005 database, SQL Compare will not subsequently be able to compare or deploy the encrypted objects.

When SQL Compare creates a snapshot, this option is ignored, and WITH ENCRYPTION is not saved in the snapshot.

AddNoPopulation

Alias: anp

Adds the 'NO POPULATION' clause to all new fulltext indexes, so that you can control when the first population occurs, rather than letting them populate at deployment time.

If you use ADD NO POPULATION then Change Tracking will be turned off on the index, as the option is not compatible with change tracking.

When SQL Compare creates a snapshot, this option is ignored, and NO POPULATION is not saved in the snapshot.

CaseSensitiveObjectDefinition

Alias: cs

For databases with case-sensitive collation, enables objects with case-sensitive names to be compared and deployed. For example, considers object names such as ATable and atable as different and performs case-sensitive comparisons on stored procedures, and so on.You should use this option only if you have databases with binary or case-sensitive sort order.

Take care when you change this option. For example, if you create a schema snapshot with this option selected and you then compare the snapshot with another database without this option set, SQL Compare may produce unexpected errors.

ConsiderNextFilegroupInPartitionSchemes

Alias: cfgps

When this option is selected, if a partition scheme contains a next filegroup, SQL Compare considers the next filegroup in the comparison and deployment if the partition scheme is extended. The next filegroup doesn't affect how data is stored.

DecryptPost2KEncryptedObjects

Alias: dp2k

When this option is specified, SQL Compare decrypts text objects in databases created using the WITH ENCRYPTION option.

  • When comparing large databases with few encrypted objects, selecting this option may result in slower performance.
  • When this option isn't selected, text objects are shown as different and can't be deployed.

DisableAndReenableDdlTriggers

Alias: drd

DDL triggers can cause problems when you run the deployment. Select this option to disable any enabled DDL triggers before deploying the databases, and re-enable those triggers following deployment.

Contents

DoNotOutputCommentHeader

Alias: nc

When this option is specified, comments and comment headers aren't included in the output deployment script.

DropAndCreateInsteadofAlter

Alias: dacia

When this option is selected, SQL Compare attempts to make scripts rerunnable by changing ALTER into DROP and CREATE statements, and adding conditional DROP statements to CREATE statements, for the following objects:

  • views
  • stored procedures
  • functions
  • extended properties
  • DDL triggers
  • DML triggers

Using this option may require additional database objects to also be dropped and recreated if those other objects depend on the selected objects; these operations will be added to the script automatically if dependencies are included.

If you specify this option, you must also select the Add Object Existence Checks option, or the deployment script will fail.

ForceColumnOrder

Alias: f

If additional columns are inserted into the middle of a table, this option forces a rebuild of the table so the column order is correct following deployment. Data will be preserved.

IgnoreBindings

Alias: ib

Ignores bindings on columns and user-defined types when comparing and deploying (eg sp_bindrule and sp_bindefault clauses would be ignored).

IgnoreCertificatesAndCryptoKeys

Alias: icc

This option is used only for SQL Server 2005 databases.

SQL Server severely restricts access to certificates, symmetric keys, and asymmetric keys. This means SQL Compare can't compare all of the properties for a symmetric key.

If certificates, symmetric keys, and asymmetric keys are selected for deployment, only the permissions are deployed.

IgnoreChangeTracking

Alias: ict

Ignores change tracking when comparing and synchronizing databases.

IgnoreChecks

Alias: ich

Ignores check constraints when comparing and deploying databases.

IgnoreCollations

Alias: ic

Ignores collation orders on character datatype columns when comparing and deploying databases.

IgnoreComments

Alias: icm

Ignores comments when comparing views, stored procedures and so on. Comments will still appear in the deployment scripts.

IgnoreConstraintNames

Alias: icn

Ignores the names of indexes, foreign keys, primary keys, and default, unique, and check constraints when comparing fields in views, tables and table-valued types. Names won't be ignored when the databases are deployed. Note that this does not ignore names in view content, for example in a table index hint.

IgnoreDatabaseAndServerName

Alias: idsn

Ignores the database and server name in synonyms when comparing databases.

IgnoreDataCompression

Alias: idc

Ignores data compression on indexes and tables.

IgnoreExtendedProperties

Alias: ie

Ignores extended properties on objects and databases when comparing and deploying databases.

IgnoreFileGroups

Alias: ifg

Ignores filegroup clauses, partition schemes, and partition functions on tables and keys when comparing and deploying databases. Partition schemes and partition functions aren't displayed in the comparison results.

IgnoreFillFactor

Alias: if

Ignores the fill factor and index padding in indexes and primary keys when comparing and deploying databases.

IgnoreFullTextIndexing

Alias: ift

Ignores full-text catalogs and full-text indexes when comparing and deploying databases.

IgnoreIdentityProperties

Alias: iip

Ignores the identity property on columns when comparing databases. The identity property won't be ignored when databases are deployed.

IgnoreIdentitySeedAndIncrement

Alias: isi

For identity properties, ignores only the identity seed and increment values when comparing databases. They won't be ignored when the databases are deployed.

IgnoreIndexes

Alias: ii

Ignores indexes, statistics, unique constraints, and primary keys when comparing and deploying databases.

IgnoreIndexLockProperties

Alias: iilp

Ignores the lock properties of indexes.

IgnoreInsteadOfTriggers

Alias: iit

Ignores INSTEAD OF DML triggers when comparing and deploying databases.

IgnoreKeys

Alias: ik

Ignores foreign keys when comparing and deploying databases.

IgnoreMigrationScripts

Alias: ims

Ignores migration scripts checked into your database repository

IgnoreNotForReplication

Alias: infr

Ignores the NOT FOR REPLICATION option on foreign keys, identities, check constraints and triggers.

If you specify this option, the NOT FOR REPLICATION statement won't be displayed in the object creation script for foreign keys, identities, and check constraints.

For triggers, the NOT FOR REPLICATION statement will be displayed in the object creation script, but will be ignored for the purposes of the comparison. When comparing triggers, you should also specify the IgnoreWhiteSpace option, but this option will also be applied to all objects in the comparison.

Check constraints and foreign keys that contain the NOT FOR REPLICATION statement in their definition will automatically be flagged as WITH NOCHECK. Use the IgnoreNocheckAndWithNocheck option to identify these objects as being the same.

IgnorePerformanceIndexes

Alias: ipi

Ignores everything that the 'Ignore indexes' option ignores except primary keys and unique constraints.

IgnorePermissions

Alias: ip

Ignores permissions on objects when comparing and deploying databases.

IgnoreQueueEventNotifications

Alias: iqen

Ignores the event notification on queues when comparing and deploying databases.

IgnoreQuotedIdentifiersAndAnsiNullSettings

Alias: iq

Ignores SET QUOTED_IDENTIFIER and SET ANSI_NULLS statements. Ignores these common SET statements when comparing views, stored procedures and so on. These statements won't be ignored when the databases are deployed. This will also remove them and the deprecated SET ANSI_PADDING from the initial SET statement.

IgnoreReplicationTriggers

Alias: irpt

Ignores replication triggers when comparing and deploying databases.

IgnoreSchemaObjectAuthorization

Alias: isoa

Ignores authorization clauses on schema objects.

IgnoreSensitivityClassification

Alias: isc

Ignores sensitivity classification on columns.  This will also ignore the sensitivity classification extended properties on SQL Server 2017 and older.

IgnoreSquareBrackets

Alias: isb

Ignores starting and ending square brackets in object names which have been escaped using square brackets. This applies to textual objects such as stored procedures, triggers, etc.

IgnoreStatistics

Alias: ist

Ignores statistics when comparing and deploying databases.

IgnoreStatisticsNorecompute

Alias: isn

Ignores STATISTICS_NORECOMPUTE on indexes.

IgnoreSystemNamedConstraintNames

Alias: iscn

Ignores the names of system named indexes, foreign keys, primary keys, and default, unique, and check constraints when comparing fields in views, tables and table-valued types. Names won't be ignored when the databases are deployed. Note that this does not ignore names in view content, for example in a table index hint.

IgnoreTriggerOrder

Alias: ito

DML triggers can have an order specified, such as FIRST INSERT, LAST UPDATE, and so on. Specify this option to ignore the trigger order for DML triggers when comparing and deploying databases. The DDL trigger order isn't affected.

IgnoreTriggers

Alias: it

Ignores DML triggers when comparing and deploying databases.

IgnoretSQLt

Alias: itst

Ignores the tSQLt schema and its contents, the tSQLtCLR assembly, the SQLCop schema and its contents, and any schemas and their contents with the tSQLt.TestClass extended property set.

IgnoreUserProperties

Alias: iup

If you specify this option, users' properties are ignored, and only the user name is compared and deployed.

If you don't specify this option, SQL Compare compares user properties, such as the type of user (SQL, Windows, certificate-based, asymmetric key based) and any schema. If a user is selected for deployment, SQL Compare deploys the properties where possible.

IgnoreUsersPermissionsAndRoleMemberships

Alias: iu

Ignores users' permissions and role memberships.

IgnoreWhiteSpace

Alias: iw

Ignores white space (newlines, tabs, spaces, and so on) when comparing databases. White space won't be ignored when the databases are deployed.

IgnoreWithElementOrder

Alias: iweo

If a stored procedure, user-defined function, DDL trigger, DML trigger, or view contains multiple WITH elements (such as encryption, schema binding, and so on), specify this option to ignore the order of the WITH elements when comparing and deploying databases.

IgnoreWithEncryption

Alias: iwe

Ignores WITH ENCRYPTION statements on triggers, views, stored procedures and functions. This option overrides Add WITH ENCRYPTION.

IgnoreWithNocheck

Alias: iwn

Ignores the WITH NOCHECK argument on foreign keys and check constraints. When this option is specified, disabled constraints aren't ignored, so this option is useful if you want to find out if a constraint is disabled.

The behavior of IgnoreWithNocheck has changed in SQL Compare 11.

In previous versions of SQL Compare, IgnoreWithNocheck ignored both the NOCHECK and WITH NOCHECK arguments on foreign keys and check constraints. In SQL Compare 11, IgnoreWithNocheck doesn't ignore the NOCHECK argument.

If you want to ignore both NOCHECK and WITH NOCHECK arguments, use IgnoreNoCheckAndWithNoCheck.

IgnoreNocheckAndWithNocheck

 

Alias: inwn

 

Ignores the NOCHECK and WITH NOCHECK arguments on foreign keys and check constraints. When this option is specified, SQL Compare always applies constraints, even when NOCHECK and WITH NOCHECK are enabled.


IncludeDependencies

Alias: incd

Includes dependent objects when comparing and deploying databases. For example, if a view depends on a table then the table will be deployed when deploying the view.

none

Alias: n

To specify no options, use the none argument.

NoAutoColumnMapping

Alias: nacm

By default, SQL Compare will automatically map columns with compatible data types and similar names in mapped tables. Setting this option will cause SQL Compare to only map identical columns.

NoDeploymentLogging

Alias: ndl

Disables the behavior to append a logging statement at the end of the generated deployment script to log the deployment details to SQL Server Log in order for SQL Monitor to detect the deployment and mark it on the timeline for performance data.

NoErrorHandling

Alias: neh

Removes error handling from the deployment scripts to produce more readable SQL. Note that if you deploy using SQL Compare, the deployment is always stopped when an error is encountered. This must be used in combination with NoTransactions. 

NoTransactions

Alias: nt

Removes transactions from the deployment SQL scripts to produce SQL code that is more readable.

If this option isn't specified and the deployment script fails, the script is rolled back to the start of the failed transaction. If this option is specified, the script isn't rolled back. This can be useful for detection of errors within a script.

ObjectExistenceChecks

Alias: oec

Checks for the existence of objects affected by the deployment by adding IF EXISTS statements in the deployment script.

This option can be useful if you want to run the deployment script multiple times.

ThrowOnFileParseFailed

 Alias: tofpf

Throws an exception when parsing a scripts folder fails.

UseClrUdtToStringForClrMigration

Alias: uclr

If CLR objects included in the deployment, this option forces two rebuilds of the table with conversion to and from strings to update the CLR objects, instead of using ALTER ASSEMBLY. For more information, see Understanding the deployment.

This option affects the deployment only.

UseCompatibilityLevel

Alias: ucl

Uses a database's compatibility level instead of the SQL Server version.




Didn't find what you were looking for?