SQL Data Compare 9

Options used in the command line

You can set project configuration options by using the /Options switch.

For example, when mapping objects, SQL Data Compare considers underscores in object names to be differences by default. Therefore, if the objects [dbo].[Widget_Prices] and [dbo].[WidgetPrices] were identical, they would not be mapped, and so could not be compared. To successfully compare these objects, use:

/Options:IgnoreUnderscores

SQL Data Compare now treats those objects as identical, and they can be compared.

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. See Defaults below.

Note that there are changes to the command line syntax of SQL Data Compare in version 8. The names, aliases, and behavior of some switches and options is different to that of earlier versions.

For more information, see Changes to the command line in SQL Data Compare 8

Defaults

If you do not specify any options, the following default options apply:

  • IgnoreSpaces
  • IncludeTimestamps
  • IncludeIdentities
  • DisableKeys
  • OutputComments
  • ReseedIdentity
  • (IgnoreCase) - This option is deprecated, and case insensitive comparison is now the default behavior.

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

/Options:Default,TrimTrailingSpaces,CompressTemporaryFiles

If you do not specify the default argument, only the options you explicitly specify apply.

To specify no options, use the none argument.

Further options are detailed below.

CaseSensitiveObjectDefinition

Alias: cs

Treats object definitions as case sensitive when mapping. For example, Table_A and table_a would not be mapped automatically.

CompressTemporaryFiles

Alias: ctf

Compresses the temporary files that SQL Data Compare generates while performing the comparison. This makes it less likely that you will run out of disk space when comparing very large databases.

Default

Alias: d

Applies the default options.

DisableAndReenableDDLTriggers

Alias: drd

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.

DisableAndReenableDMLTriggers

Alias: t

Disables DML triggers on tables and views before synchronizing the databases, and then re-enables those triggers following synchronization.

DisableKeys

Alias: k

Disables foreign keys before synchronizing the databases, and then re-enables those foreign keys following synchronization. Note that in some circumstances foreign keys will be dropped and re-created rather than disabled and re-enabled.

DoNotOutputCommentHeader

Alias: nc

When this option is selected, comment headers are not included in the output script.

DropConstraintsAndIndexes

Alias: c

Drops primary keys, indexes, and unique constraints before synchronizing the databases, then re-creates them following the synchronization.

If the primary key, index, or unique constraint is the comparison key, it cannot be dropped.

ForceBinaryCollation

Alias: fbc

Forces binary collation for all string data types, irrespective of column collation, resulting in a case-sensitive comparison. When this option is selected and the comparison key is a string, this may result in slower performance because the indexes are not used.

ForceCheck

New option. Forces any constraints (for example, those on foreign keys) disabled by SQL Data Compare to be re-enabled with CHECK.

IgnoreCase

This option is deprecated, and case insensitive comparison is now the default behavior.

IgnoreSpaces

Alias: is

When mapping objects for comparison, spaces in the names of objects are considered by default. This option ignores spaces in the names of objects, enabling them to be mapped. For example [dbo].[Widget Prices] is mapped to [dbo].[WidgetPrices].

IgnoreUnderscores

Alias: iun

When mapping objects for comparison, underscores in the names of objects are considered by default. This option ignores underscores in the names of objects, enabling them to be mapped. For example, [dbo].[Widget_Prices] is mapped to [dbo].[WidgetPrices].

IncludeIdentities

Alias: iid

Includes identity columns in the comparison.

Note that you cannot synchronize a view if it includes an identity column.

IncludeIndexedViews

Alias: v

Includes views in the comparison. Views can be synchronized only if the referenced rows are from a single table, and the referenced columns are simple. For example, they must not include identity columns or computed columns.

IncludeTimestamps

Alias: its

Includes timestamp columns in the comparison.

Note that timestamp columns cannot be synchronized.

None

Alias: n

To specify no options, use the none argument.

OutputComments

Alias: oc

Includes comments in the synchronization SQL script.

ReSeedIdentity

Alias: rsi

Re-seeds identity columns so that identity values in the database you are updating match values in the source database.

TransportCLRBinary

Alias: tclr

When this option is selected, SQL Data Compare uses the binary representation of CLR types in the synchronization SQL script. If this option is not selected, CLR data types are represented as strings.

TrimTrailingSpaces

Alias: tts

When this option is selected, and the data in two columns differs only by the number of spaces at the end of the string, SQL Data Compare treats those columns as identical.

Note that this option does not apply to CLR columns, or XML columns.

UseChecksumComparison

Alias: ucc

When this option is selected, SQL Data Compare performs a checksum prior to comparison. Data is compared only if the checksums differ. You can use this option to improve the performance of SQL Data Compare.

Note that in SQL Server 2000 databases, db_owner permissions are required to use this option.

UseTransactions

Alias: ut

When this option is selected transactions are used in the synchronization SQL scripts, enabling changes to be rolled back if the synchronization fails. BEGIN TRANSACTION is inserted at the beginning of the synchronization SQL script, and COMMIT TRANSACTION at the end of the script.


Didn't find what you were looking for?