Command line & filter shenanigans

Forum for users of SQL Compare schema synchronization utility

Command line & filter shenanigans

Postby Spud » Fri Apr 05, 2013 8: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 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">
<Expression>(@NAME LIKE 'xx%') OR (@NAME LIKE 'aspnet%')</Expression>

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">
<Expression>(@NAME LIKE 'xx%') OR (@NAME LIKE 'aspnet%')</Expression>

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 :)
Posts: 16
Joined: Thu Mar 21, 2013 2:08 pm
Location: United Kingdom

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

Thanks for your post! I believe I have answered this very same question on Stack: ... ing-issues

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

Return to SQL Compare Previous Versions

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest