SQL Compare 9

Options used in the command line

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 do not 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 do not 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

Alais: adus

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

AddWithEncryption

Alias: we

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

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

When SQL Compare creates a snapshot, this option is ignored, and WITH ENCRYPTION 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 synchronized. 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.

Note that you should 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

This option is used only for SQL Server 2008 and SQL Server 2005 databases.

When this option is selected, if a partition scheme contains a next filegroup, SQL Compare considers the next filegroup in the comparison and synchronization if the partition scheme is extended. The next filegroup does not affect the way in which data is stored

DecryptPost2KEncryptedObjects

Alias: dp2k

This option is used only for SQL Server 2008 and SQL Server 2005 databases.

When this option is selected, SQL Compare decrypts text objects in SQL Server 2005 and SQL Server 2008 databases which were created using the WITH ENCRYPTION option. Note that when comparing large databases with few encrypted objects, selecting this option may result in slower performance.

When this option is not selected, text objects in SQL Server 2005 and SQL Server 2008 databases are shown as different, and cannot be synchronized.

DisableAndReenableDdlTriggers

Alias: drd

This option is used only for SQL Server 2008 and SQL Server 2005 databases..

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

DisableSOCForLiveDBs

Alias: dafld

When this option is selected, SQL Compare will not 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 is a problem connecting to source control when comparing a database.

DoNotOutputCommentHeader

Alias: nc

When this option is set comments and comment headers are not included in the output synchronization script.

DropAndCreateInsteadofAlter

Alias: dacia

When this option is selected, SQL Compare replaces ALTER statements in the deployment script with DROP and CREATE statements for the following objects:

  • Views
  • Stored Procedures
  • Functions
  • Extended Properties
  • DDL Triggers
  • DML Triggers

Note that if you select 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 synchronization. Data will be preserved.

IgnoreBindings

Alias: ib

Ignores bindings on columns and user-defined types when comparing and synchronizing (e.g. 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. Consequently, SQL Compare cannot compare all of the properties for a symmetric key.

If certificates, symmetric keys, and asymmetric keys are selected for synchronization, only the permissions are synchronized.

IgnoreChecks

Alias: ich

Ignores check constraints when comparing and synchronizing databases.

IgnoreCollations

Alias: ic

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

IgnoreComments

Alias: icm

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

IgnoreConstraintNames

Alias: icn

Ignores the names of indexes, foreign keys, primary keys, and default, unique, and check constraints when comparing databases. Note that the names will not be ignored when the databases are synchronized.

IgnoreDatabaseAndServerName

Ignores the names of databases and servers when comparing databases.

This option is only used for SQL Server 2008 and SQL Server 2005 databases.

IgnoreDataCompression

Alias: idc

Ignores data compression on indexes and tables.

IgnoreExtendedProperties

Alias: ie

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

IgnoreFileGroups

Alias: ifg

Ignores filegroup clauses, partition schemes, and partition functions on tables and keys when comparing and synchronizing databases. Partition schemes and partition functions are not displayed in the comparison results.

IgnoreFillFactor

Alias: if

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

IgnoreFullTextIndexing

Alias: ift

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

IgnoreIdentityProperties

Alias: iip

Ignores the identity property on columns when comparing databases. Note that the identity property will not be ignored when databases are synchronized.

IgnoreIdentitySeedAndIncrement

Alias: isi

For identity properties, ignores only the identity seed and increment values when comparing databases. Note that they will not be ignored when the databases are synchronized.

IgnoreIndexes

Alias: ii

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

IgnoreIndexLockProperties

Alias: iilp

Ignores the lock properties of indexes.

IgnoreInsteadOfTriggers

Alias: iit

Ignores INSTEAD OF DML triggers when comparing and synchronizing databases.

IgnoreKeys

Alias: ik

Ignores foreign keys when comparing and synchronizing databases.

IgnoreNotForReplication

Alias: infr

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

If you select this option, the NOT FOR REPLICATION statement will not be displayed in the object creation script for foreign keys, identities, and check constraints.

In the case of 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 select the Ignore white space option, but note that 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 Ignore WITH NOCHECK option to identify these objects as being the same; but note that this will apply to constraints in all objects.

IgnorePermissions

Alias: ip

Ignores permissions on objects when comparing and synchronizing databases.

IgnoreQueueEventNotifications

Alias: iqen

This option is used only for SQL Server 2008 and SQL Server 2005 databases.

Ignores the event notification on queues when comparing and synchronizing 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. Note that these statements will not be ignored when the databases are synchronized.

IgnoreReplicationTriggers

Alias: irpt

Ignores replication triggers when comparing and synchronizing databases.

IgnoreSchemaObjectAuthorization

Alias: isoa

Ignores authorization clauses on schema objects.

IgnoreSquareBrackets

Alias: isb

Ignore 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 synchronizing databases.

IgnoreStatisticsNorecompute

Alias: isn

Ignore STATISTICS_NORECOMPUTE on indexes.

IgnoreSystemNamedConstraintNames

Alias: iscn

Ignore 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 synchronized.

IgnoreTriggerOrder

Alias: ito

This option is used for SQL Server 2000 and later databases.

DML triggers can have an order specified, such as FIRST INSERT, LAST UPDATE, and so on. Select this option to ignore the trigger order for DML triggers when comparing and synchronizing databases. Note that the DDL trigger order is not affected.

IgnoreTriggers

Alias: it

Ignores DML triggers when comparing and synchronizing 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 is used only for SQL Server 2008 and SQL Server 2005 databases.

If this option is not selected, 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 synchronization, SQL Compare synchronizes the properties where possible.

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

IgnoreUsers

Alias: iu

When role-based security is used, object permissions are assigned to roles, not users. If this option is selected, SQL Compare compares and synchronizes object permissions only for roles, and members of roles that are roles. Users' permissions and role memberships are ignored.

IgnoreUsersPermissionsAndRoleMemberships

Alias: iup

Ignore users' permissions and role memberships.

IgnoreWhiteSpace

Alias: iw

Ignores white space (newlines, tabs, spaces, and so on) when comparing databases. Note that white space will not be ignored when the databases are synchronized.

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), select this option to ignore the order of the WITH elements when comparing and synchronizing databases.

IgnoreWithNocheck

Alias: iwn

Ignores the WITH NOCHECK argument on foreign keys and check constraints. Ignores the 'not trusted' flag on foreign keys and check constraints.

Note that foreign keys or constraints that are disabled, are not ignored.

IncludeDependencies

Alias: incd

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

none

Alias: n

To specify no options, use the none argument.

NoTransactions

Alias: nt

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

If this option is not selected and the synchronization script fails, the script is rolled back to the start of the failed transaction. If this option is selected, the script is not 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, for example, if you want to run the deployment script multiple times.

UseClrUdtToStringForClrMigration

Alias: uclr

This option is used only for SQL Server 2008 and SQL Server 2005 databases.

If CLR objects are to be synchronized, 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 a detailed explanation, see Understanding the synchronization.

This option affects the synchronization only.

 


Didn't find what you were looking for?