SqlCompare filter not being used when called by SQLCI.exe

Automated deployment for web applications and databases

SqlCompare filter not being used when called by SQLCI.exe

Postby puw2000 » Wed Jan 22, 2014 11:06 pm

We are running SQLCI.exe for automating our SQL Server schema as part of a TFS 2012 Team build. We are following the documentation found in this link: http://documentation.red-gate.com/display/SOC3/Using+Team+Foundation+Server+2012+or+Team+Foundation+Service#. We are deploying from source control directly to a downstream database with these additionalCompareArgs: /Filter:filter.scpf /LogLevel:Verbose.

I created the filter via the gui in the .scpf file, but it seems as if it isn’t picked up. (Extract from the scpf file)
<Role version="1">
<Expression>(@NAME LIKE '%')</Expression> />

Extract of MSBuild log file:
Build started.
C:\\Builds2\\>sqlCI.exe "/scriptsFolder:Database\\ScriptsFolder\\RegGateCI" "/databaseServer:MYSERVER" "/databaseName:WidgetShop" "/databaseIntegratedAuthentication" "/additionalCompareArgs:/Filter:filter.scpf /LogLevel:Verbose" "/licenseSerialKey:XXX-XXX-XXXX-XXXX"
sqlCI.exe -- Red Gate's SQL Continuous Integration v1.1.1.1034

STARTING: Verifying license
Exiting since no other command line options were passed.
Terminating application with exit code 0 to indicate success

STARTING: Updating database
Starting: C:\\Builds2\\SC\\SQLCompare.exe /include="Identical" /include="StaticData" /scripts1="Database\\ScriptsFolder\\RegGateCI" /server2="MYSERVER" /database2="WidgetShop" /synchronize /Filter="filter.scpf" /LogLevel="Verbose"
SQL Compare Command Line V10.5.0.378
Retrieving migration scripts
Checking for identical databases
Creating SQL
Inserting static data SQL into deployment script
Deploying changes (from DB1 to DB2)

Summary Information
DB1 = RegGateCI
DB2 = MYSERVER.WidgetShop
Role db_denydatareader == ==
Role db_backupoperator == ==
Role db_datareader == ==
Role db_accessadmin == ==
Build succeeded.
0 Warning(s)
0 Error(s)

You can see that the filter to exclude roles were not picked up even the /filter switch was passed from SqlCI.exe to SqlCompare.exe.

I am new to this forum. Please feel free to point me to any existing solution which i was unable to find.

Posts: 2
Joined: Wed Jan 22, 2014 9:39 pm

Postby james.billings » Thu Jan 23, 2014 1:34 pm


I think one possibililty here is the "include identical" switch- according to the docs the filter switch can't be used alongside the /include switch (although I'm guessing the staticdata option is an exclusion to that)

I can't see from the log output where it was added though?
Posts: 1121
Joined: Wed Jun 16, 2010 10:10 am
Location: Red Gate

Good question

Postby puw2000 » Thu Jan 23, 2014 8:11 pm

Good catch.

i couldn't find how the 2 SC arguments were added. /include="Identical" /include="StaticData". They were certainly not from the target file <additionalCompareArgs>/Filter:snapshotfilter.scpf /LogLevel:Verbose</additionalCompareArgs>

i checked the filter .scpf file and SQLCompare.exe.config, they did not include any of the switches or anything related i could think of.

Posts: 2
Joined: Wed Jan 22, 2014 9:39 pm

Return to Deployment Manager

Who is online

Users browsing this forum: No registered users and 0 guests