Command line & filter shenanigans

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

Command line & filter shenanigans

Postby Spud » Fri Apr 05, 2013 9:51 am

I've a couple of saved projects that I'm using from the command line to compare a database with TFS.
One of my databases has a large number of asp.net related tables which all include "aspnet" in the table name, and I'm trying to filter these out.

To start I created the filter via the gui in the .scp file, but it seems as if it isn;t picked up. (Extract from the scp file..)
<Table version="1">
<Include>False</Include>
<Expression>(@NAME LIKE 'xx%') OR (@NAME LIKE 'aspnet%')</Expression>
</Table>

I've then created a filter again through the GUI, and am calling it from the command line with the /filter switch, but again it isn't being used. (extract from the .scpf file)
<Table version="1">
<Include>False</Include>
<Expression>(@NAME LIKE 'xx%') OR (@NAME LIKE 'aspnet%')</Expression>
</Table>

If I change the /filter switch to point to a non-existent file it does error, so presumably it is using the filter switch, and indeed is listed in the output..
Argument /filter has value 'DatabaseNameFilter.scpf'

What am I missing here please?

Here's the full commandline

"C:\\Program Files (x86)\\Red Gate\\SQL Compare 10\\sqlcompare.exe" /project:"C:\\Users\\CIUser\\Documents\\SQL Compare\\SharedProjects\\MyDB (Head) v MyDB.scp" /assertidentical /password1:mypassword /include:identical /Report:myreport.html /ReportType:Simple /Options:Default,ForceColumnOrder,IgnoreCollations,oec,IncludeDependencies /verbose /force /filter:MyFilter.scpf >f.txt

Cheers :)
Spud
 
Posts: 16
Joined: Thu Mar 21, 2013 3:08 pm
Location: United Kingdom

Postby Brian Donahue » Mon Apr 08, 2013 11:51 am

Thanks for your post! I believe I have answered this very same question on Stack: http://stackoverflow.com/questions/1583 ... ing-issues

I hope that answers your question!
Brian Donahue
 
Posts: 6668
Joined: Mon Aug 23, 2004 10:48 am


Return to SQL Compare 10

Who is online

Users browsing this forum: No registered users and 0 guests