SQL Data Compare 5   

Basic Command Line Features

See Also

This topic describes how to use the basic features of the command line.

Getting help from the command line

To display help on any of the tools from the command line, enter:

SQLDataCompare /help

This displays a brief description of the tool, and basic help on all the command line switches.

For more detailed help enter:

SQLDataCompare /help /verbose

This displays a detailed description of each switch and the values it can accept (where applicable), and all exit codes. To output the help in HTML format, enter:

SQLDataCompare /help /verbose /html

Entering a command

When you enter a command line, the order of switches is unimportant. You are recommended to follow the Microsoft convention of separating a switch from its values using a colon as shown below.

/out:output.txt

(You can separate a switch that accepts a single value from its value using a space, but this is not recommended.) Values that include spaces must be delimited by double quotation marks ( " ). For example:

/out:"c:\output file.txt"

Note that if you delimit a path with double quotation marks, you must not terminate the path with the backslash character ( \ ), because the backslash will be interpreted as an escape character. For example:

Incorrect:    /location:"C:\Packages\"

Correct:      /location:"C:\Packages"

For switches that accept multiple values, use commas to separate the values. For example:

/options:IgnoreSpaces,IgnoreUnderscores

For switches that accept a compound value, separate each part of the value using a colon. For example, the /include and /exclude switches are used to include and exclude database objects from the actions performed by the tool. For example:

/include:table:Product

includes all tables for which the table name contains the word Product.

Aliases

Many of the switches have an alias. The alias provides a convenient short-hand way to specify the switch. For example, /? is the alias for the /help switch, and /v is the alias for the /verbose switch. Note that switches and aliases are not case-sensitive.

/options switch

You can use the /options switch to change your options. For example, by default, comparisons do not consider trailing spaces; to specify that SQL Data Compare considers spaces at the end of the string:

/options:TrimTrailingSpaces

However, note that if you set any options explicitly, all of the default options are switched off.

Refer to the full command line help for more information about which options are set by default, and all the options that are available.

/verbose and /quiet switches

The standard output mode prints basic information about what the tool is doing while it is executing. You can specify verbose and quiet modes using the /verbose and /quiet switches, respectively: in verbose mode, detailed output is printed; in quiet mode, output is printed only if an error occurs.

Redirecting command output

Output from all commands can be redirected to a file by one of several methods:

 

 

 


© Red Gate Software Ltd 2007. All Rights Reserved.