Red Gate forums :: View topic - Command line & filter shenanigans
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

Command line & filter shenanigans

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



Joined: 21 Mar 2013
Posts: 16
Location: United Kingdom

PostPosted: Fri Apr 05, 2013 9:51 am    Post subject: Command line & filter shenanigans Reply with quote

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



Joined: 23 Aug 2004
Posts: 6588

PostPosted: Mon Apr 08, 2013 11:51 am    Post subject: Reply with quote

Thanks for your post! I believe I have answered this very same question on Stack: http://stackoverflow.com/questions/15837385/redgate-sqlcompare-filter-not-being-used-causing-issues

I hope that answers your question!
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