How do I get command line to respect exclude arguments?

Compares and synchronizes SQL Server databases, backups and scripts.

Moderators: JonathanWatts, Chris Auckland, David Atkinson, eddie davis, Anu Deshpande, Michelle Taylor, alice.easey, james.billings, chengvoon.tong

How do I get command line to respect exclude arguments?

Postby freecell1 » Tue Mar 13, 2012 8:29 pm

Based on the documentation for SQL Compare command line it seems I should be able to do this:

sqlcompare /Include:identical /exclude:assembly /Scripts1:'C:\\TeamCity\\buildAgent\\work\\c0ebf743024d92d6\\trunk\\Database\\Databases\\Intranet' /Server2:MYSERVER /Database2:Intranet

but the exclude switches seem to do nothing. The output clearly compares the assemblies anyway. I got

/exclude user

to work, but not role or assembly. Suggestions?
freecell1
 
Posts: 21
Joined: Tue Mar 13, 2012 8:21 pm

Postby peter.peart » Thu Mar 15, 2012 9:57 pm

Thanks for your post. I suspect that the assembly is being pulled in because of a dependency. You'd need to, as far as I am aware, specify all the options you did want manually and not specify to include dependencies.

HTH!

Pete
Peter Peart
Red Gate Software Ltd
+44 (0)870 160 0037 ext. 8569
1 866 RED GATE ext. 8569
peter.peart
Site Admin
 
Posts: 362
Joined: Tue Sep 02, 2008 9:58 am
Location: Top floor, RG towers with the cool kids

Postby freecell1 » Fri Mar 16, 2012 5:50 pm

I figured it out. It looks like the /include:identical switch overrides /exclude switches, because when I took the include out it worked as expected.

This isn't the behavior I'd expect to see. I would think that

/include:identical /exclude:assembly /exclude:role

for example, would first exclude all roles and assemblies, and then produce a report of the remaining object types including identical ones. That's not how it works though ... I tried

/include:identical /exclude:role

to take assembly-related concerns out of the test, and it output a list that included roles ...
freecell1
 
Posts: 21
Joined: Tue Mar 13, 2012 8:21 pm


Return to SQL Compare 10

Who is online

Users browsing this forum: No registered users and 0 guests