What are the challenges you face when working across database platforms? Take the survey
Options

/project switch help is misleading

ismeisme Posts: 119
edited July 25, 2013 8:39AM in SQL Compare Previous Versions
To see the verbose help, run this command:
SQLCompare.exe /verbose /help

The help for the /project switch contains a message like this:
/project:<project> (Alias: /pr)
    Uses a SQL Compare (.scp) or SQL Data Compare (.sdc) project file for
    comparison / migration. Note that options are not stored with the project so
    if you wish to use anything other than the default options you must use the
    /options switch to specify the options you want to use. You may also specify
    additional rules for including and excluding objects using the /include and
    /exclude switches.

This message contains two misleading statements.

The first is about project options:
Note that options are not stored with the project so if you wish to use anything other than the default options you must use the /options switch to specify the options you want to use.

It might have been true in the past, but it is no longer the case that a SQL Compare project file does not store options. The options are stored in the <Options> element.

My typical options look like this:
&lt;Options&gt;IgnoreWhiteSpace, IncludeDependencies, IgnoreDatabaseAndServerName, DecryptPost2kEncryptedObjects, IgnoreTSQLT&lt;/Options&gt;

It would be great if SQLCompare.exe could parse the options from the file.

At the very least, the documentation should phrase this as a limitation of the program rather than the project format.

It could say something like this:
Note that SQLCompare.exe does not parse the options stored in the project file. If you wish to use anything other than the default options you must use the /options switch to specify the options you want to use.

The second is about the /include and /exclude switches:
You may also specify additional rules for including and excluding objects using the /include and /exclude switches.

This would suggest to me that I can work around the fact that SQLCompare.exe ignores project filters by using the /include and /exclude switches.

When you try to combine the /project switch with the /exclude switch you see an error instead:
Error: The /project switch cannot be used in conjunction with the /exclude switch.

It would be great if SQLCompare.exe could parse the inclusions and exclusions from the project.

At the very least, the documentation should make it clear that the switches can not be used together.

It could say something like this:
SQLCompare.exe does not parse the inclusion and exclusion rules from the project file. You can specify filters using the /include and /exclude switches, but not in conjunction with the /project switch. To use the /include and /exclude switches with other settings defined in the project, remove the /project switch and use the other switches to recreate the settings.

In an earlier forum post I documented an example of the surprising behavior this limitations produce.
Iain Elder, Skyscanner

Comments

Sign In or Register to comment.