SQL Compare 11

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: adusAdds a USE statement at the top of the SQL deployment script.

AddWithEncryption

Alias: weAdds 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.

CaseSensitiveObjectDefinition

Alias: csFor 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: cfgpsThis option isn't used for SQL Server 2000 databases.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: dp2kThis option isn't used for SQL Server 2000 databases.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: drdThis option isn't used for SQL Server 2000 databases.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

DisableSOCForLiveDBs

Alias: dafld

When this option is specified, SQL Compare won't retrieve migration scripts when you compare a database. (By default, when you compare a database that has an associated revision number, SQL Compare tries to connect to source control to retrieve any relevant migration scripts.) This option can be useful if there's a problem connecting to source control when comparing a database.

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 specified, SQL Compare replaces ALTER statements in the deployment script with DROP and CREATE statements for:

  • views
  • stored procedures
  • functions
  • extended properties
  • DDL triggers
  • DML triggers
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.

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 databases. Names won't be ignored when the databases are deployed.

IgnoreDatabaseAndServerName

Alias: idsn

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

This option isn't used for SQL Server 2000 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 when comparing and deploying databases. For information about migration scripts, see Working with migration scripts (SQL Source Control documentation).

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.

IgnorePermissions

Alias: ip

Ignores permissions on objects when comparing and deploying databases.

IgnoreQueueEventNotifications

Alias: iqen

This option isn't used for SQL Server 2000 databases.

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.

IgnoreReplicationTriggers

Alias: irpt

Ignores replication triggers when comparing and deploying databases.

IgnoreSchemaObjectAuthorization

Alias: isoa

Ignores authorization clauses on schema objects.

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 system named constraint and index names. Ignores the names of system named indexes, foreign keys, primary keys, default, unique and check constraints. The names will still be scripted and deployed.

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

This option isn't used for SQL Server 2000 databases.

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.

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

This option isn't used for SQL Server 2000 databases.

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.

UseMigrationsV2

Alias: mv2

Enables the Migrations V2 beta. V1 migration scripts will be ignored.

For more information, see Migration scripts V2 beta (SQL Source Control documentation).


Didn't find what you were looking for?