SQL Data Compare - 10.0
Changes to the command line in SQL Data Compare 8
These changes coincide with the release of SQL Compare 8, and are intended to make command line syntax more consistent between SQL Compare and SQL Data Compare.
In SQL Data Compare 8, there are changes to the names and functions of some command line switches and options, as well as their aliases.
- The command line syntax of previous versions of SQL Data Compare is considered deprecated, but continues to be supported.
For example, in SQL Data Compare 7, the alias for /BackupSet1 was /bs1. In SQL Data Compare 8, the alias is now /bks1. You can continue to use /bs1 in SQL Data Compare 8, but a message is displayed informing you of the new alias.
Deprecated command line syntax will cease to be supported at a future release.
This topic addresses the following:
- Which switches have changed?
- Which options have changed?
- Changes to case sensitivity behaviour
- Compatibility with earlier versions
Which switches have changed?
/AllowIdenticalDatabases
This switch is deprecated. Instead use /Include:Identical
/BackupSet1 and /BackupSet2
The aliases for these switches are now /bks1 and /bks2.
The functionality of these switches has not changed.
/CaseSensitive
This switch is deprecated. Instead use /Options:CaseSensitiveObjectDefinition
/Columns
This switch is deprecated. Instead use /IncludeColumns and /ExcludeColumns
/ExportIdenticalTables
This switch is deprecated. Instead use /Include:Identical
/IgnoreParserErrors
If SQL Data Compare encounters any high level errors when parsing a scripts folder, it will exit with an error code of 62.
Use /ignoreParserErrors to force SQL Data Compare to continue without exiting.
/Include and /Exclude
Specify which tables and views are included in the comparison.
/Include and /Exclude have the following arguments:
|
only those objects that are not present in the source (eg /db1) |
|
only those objects that are not present in the target (eg /db2) |
|
only those objects that are present in both data sources, but are different. |
|
identical objects in the command line output and any generated reports. |
|
objects you specify with a regular expression (eg /include:Table:WidgetPurchases) |
Note that if there is a conflict, /Exclude takes precedence over /Include
/IncludeColumns and /ExcludeColumns
Specifies which columns in a table are included in or excluded from the comparison.
Note that /ExcludeColumns takes precedence over /IncludeColumns
/IncludeAdditional
This switch is deprecated. Instead use /Include:Additional
/ScriptFile
Alias: /sf
Generates a SQL script to migrate the changes which can be executed at a later time. If the file already exists an error will occur, unless you use the /Force switch:
sqldatacompare /db1:WidgetStaging /db2:WidgetProduction
/ScriptFile: "C:\Scripts Folder\WidgetSyncScript.sql"
/Scriptfile can be used when the target ( /db2, /scr2, /sn2 ) is a database, a snapshot, or a scripts folder.
If the target is a snapshot or a scripts folder, the generated script modifies a database with the schema represented by that snapshot or scripts folder.
Which options have changed?
DDLTriggerDisable
This option has been renamed: DisableAndReenableDDLTriggers, with the alias drd
DisableDMLTriggers
This option has been renamed: DisableAndReenableDMLTriggers, with the alias t
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. Case insensitive comparison is now the default behaviour.
Changes to case sensitivity behaviour
In earlier versions of SQL Data Compare the case sensitivity behaviour of the command line interface was inconsistent.
/CaseSensitive affected the matching of object names for the /Include, /Exclude, /Columns, and /ComparisonKeys switches. The option IgnoreCase was on by default, and affected the case sensitivity of object and owner mapping.
These behaviours are now deprecated, and all switches and mappings share the same case sensitivity behaviour.
In SQL Data Compare 8:
- the default setting is case insensitive
- case sensitivity is set using /Options:CaseSensitiveObjectDefinition
Compatibility with earlier versions
Although the command line syntax of previous versions of SQL Data Compare is considered deprecated, it continues to be supported.
If you use deprecated syntax, a warning is displayed, but SQL Data Compare functions normally.
Note that for case sensitivity, the new syntax takes precedence. For example, if you set both /Options:CaseSensitiveObjectDefinition and /Options:IgnoreCase, the command line behaviour is case sensitive.
You are recommended to use the new syntax. Deprecated command line syntax will cease to be supported at a future release.
See also |
Was this article helpful?
SQL Data Compare
- Logging and log files
- Internal Connection Fatal Error in versions 4 and 5
- NULL textptr passed to UPDATETEXT function when running synchronization
- How much free hard disk space is required?
- Comparing the data of two tables in the same database
- Suggestions to combat comparison and synchronization performance issues
- SQL comparison and synchronization automation capabilities
- SqlNullValueException occurring in synchronization wizard
- SQL Data Compare command-line XML argument file examples
- Using Windows authentication logons between domains
- Using a filter on a column on related (joined) tables
- Determining minimum database permissions for SQL Data Compare
- Tables with compound keys may not be mapped automatically
- Best practices for synchronizing data
- Cleaning up a SQL script after SQL Compare or SQL Data Compare
- Troubleshooting System.OutOfMemoryException during comparison
- Exception thrown by db reader 1
- Reseed applying "incorrect" identity values
- Running migration scripts using SqlCmd.exe
- This SQL Server has been optimized for x concurrent queries.
- SQL Data Compare showing differences in 2 identical databases
- How to force SQL Compare and SQL Data Compare to use an Encrypted Connection
- Improving the performance of SQL Data Compare
- Logging and log files
- Case-sensitive comparisons
- Tables or views that could not be compared
all SQL products
- Compatibility of Red Gate tools in 64-bit environments
- Application has encountered an error and needs to close
- Error message after installing SQL Toolbelt - The description for Event ID ( 1 ) in Source ( nview_info ) cannot be found.
- Changing the temporary directory used by the installer
- Toolbelt Installer "hanging" while "scanning volumes"
- Login failing with "trusted SQL Server connection" error when using RunAs
all products
- Some Red Gate products identified as containing a trojan by Anti-Virus software
- Activation may fail with Unknown Error -1
- Product uses web help although a CHM file is available locally
- Argument exception resulting from missing environment variable
- Check for updates may fail when used through proxies
- 'Unidentified Publisher' error when repairing or uninstalling
- Licensing activates product as standard edition
- Moving Red Gate software products to another machine
- Red Gate tools log locations
- The application UI opening slowly when there is no internet access
SQL Data Compare
- Activating your products
- Activating your products
- Getting help offline
- Getting better performance out of SQL Data Compare
- Release notes - version 10.xx
- SQL Data Compare release notes - version 7.xx
- SQL Data Compare release notes - version 8xx
- SQL Data Compare release notes - version 9.xx
all SQL products
all products
- Red Gate product acknowledgements
- Activating your products
- Activating your products
- Red Gate bundle history
- Check for updates
- Troubleshooting Check for Updates errors
- Current versions
- Deactivating your products
- Installing Red Gate products from the .msi file
- Requesting additional activations
- Serial numbers for bundles
- Reactivating using a different serial number
- Extending your trial
- Finding your serial numbers
- Moving a serial number from one computer to another
- No response received for manual activation
- Licensing and activation resources
- Licensing and activation resources
- Troubleshooting licensing and activation errors
- Licensing and activation FAQs
- Red Gate tools log file locations
- Download old versions of products
- Download product prerequisites & utilities
- Support & upgrades
- Upgrading your software
- Upgrading FAQs

Using SQL Data Compare