/Include:Identical different from /include:identical

AusarbAusarb Posts: 6
edited September 23, 2011 10:50AM in SQL Compare Previous Versions
SQL Compare Command Line V9.0.0.79

I have a target DB that is the exact same as the source except for a single table in the target DB has an extra column. When I sync source to target I expect that the column in target should be removed. If I don't put any /Include or similar into the command line, it will delete the column as expected, but if I run it again and that column doesn't exist (the DB's are now 100% the same) I get a return code of 63, which blows up my CI build on Jenkins. According to the documentation, it says to add "/Include:Identical" to suppress that error code. When I do put that in, I no longer get the 63 RC when the DB's are the same, but it no longer updates the target DB by deleting the column when they are different.

BUT..... If I make it all lower case (/include:identical) it works as expected, both when the DB's are exactly the same and when the target starts out with the extra column. This also appears to be the same behavior as using the deprecated /allowIdenticalDatabases flag. Is this a bug or am I reading the documentation wrong? After a bit more poking, it isn't /Include that needs to be all lower case, but just :identical. My guess is that multiple pieces of code parsing the command line arguments, with the one suppressing code 63 being case insensitive.

Works: "C:\Program Files (x86)\Red Gate\SQL Compare 9\SQLCompare" /scr1:.\CCADatabase /server2:(local) /db2:TrunkJenkinsCCA /o:Default /include:identical /sync
Doesn't Work: "C:\Program Files (x86)\Red Gate\SQL Compare 9\SQLCompare" /scr1:.\CCADatabase /server2:(local) /db2:TrunkJenkinsCCA /o:Default /Include:Identical /sync

From the doc:
    - "/allowIdenticalDatabases has been deprecated. Please use /include:identical instead. /Include:Identical suppresses the exit code if the two data sources are identical. If /Include:Identical is not set, SQL Data Compare returns the error code 63." - "The databases being compared are identical with respect to the data included in the comparison. Use /Include:Identical to suppress this error."

Thanks for this post for getting me in the right direction..
http://www.red-gate.com/messageboard/vi ... hp?t=13779

Comments

Sign In or Register to comment.