Red Gate forums :: View topic - /project switch help is misleading
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Compare 10
SQL Compare 10 forum

/project switch help is misleading

Search in SQL Compare 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message
isme



Joined: 12 Jun 2012
Posts: 80
Location: Edinburgh

PostPosted: Fri Jul 19, 2013 6:39 pm    Post subject: /project switch help is misleading Reply with quote

To see the verbose help, run this command:

Code:

SQLCompare.exe /verbose /help


The help for the /project switch contains a message like this:

Code:

/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:

Quote:

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:

Code:

<Options>IgnoreWhiteSpace, IncludeDependencies, IgnoreDatabaseAndServerName, DecryptPost2kEncryptedObjects, IgnoreTSQLT</Options>


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:

Quote:

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:

Quote:

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:

Code:

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:

Quote:

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.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6673

PostPosted: Mon Jul 22, 2013 3:34 pm    Post subject: Reply with quote

I believe the functionality of the command-line changed several times without corresponding change to the documentation. Thanks for pointing this out.
Back to top
View user's profile Send private message
isme



Joined: 12 Jun 2012
Posts: 80
Location: Edinburgh

PostPosted: Thu Jul 25, 2013 1:39 pm    Post subject: Reply with quote

Thanks for the explanation, Brian.

Manfred Castro filed bug SC-6447 where SQLCompare.exe ignores project filters.

When the bug is fixed, it might be a good opportunity to update the documentation as well.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group