Competition: What’s your favorite Redgate tool? Enter now.

sqlCompare SDK ignoring option for 'Ignore With NoCheck'

electrumelectrum Posts: 7
edited September 18, 2014 4:11PM in SQL Comparison SDK Previous Versions
on a SQLServer 2014 database.
i'm getting a sqlCompare failure for a difference between a snapshot and a database for the item 'WITH NOCHECK'. the snapshot has 'WITH NOCHECK' and the database does not.

but we are setting the option to 'IgnoreWithNocheck' when executing the utility that does the comparison using the SDK (i believe it is the latest 10.7 SDK).

the snapshot file was created using the sQLCompare 10.7 GUI and i have also tried with a snapshot created from the latest SDK.

the developer that wrote the utility that uses the SDK for the comparison says he can provide his source code if you need to see it.

was something changed for the Ignore With NoCheck option? or does this not yet work in the new SDK?
thanks.. eric kundl

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Thanks for contacting Red Gate. It may be important to know the exact syntax of the key creation - WITH NOCHECK can be used as "do not check existing data on creation" in one syntax and "disable constraint" in another.

    Generally speaking, the trick with Options is to apply them consistently - declare a global set of options and supply them to Database.Register, CompareWith, and the method you use to create the script.

    Also worth noting is that Options changed in 10.7; it was an enum type and now it's an object. Where you used to create options with a bitwise OR (Options.Default | Options.SomethingElse) it is now using Options o=Options.Default.Plus(Options.SomethingElse).
  • the developer that wrote the utility did modify it to use the new 'options' syntax.

    i can send you a copy of his C# code to look at if you would like to see it.
    if you could PM me with an email i'll send you the source code.

    he has an XML file that we put the 'ignore option's into that his program reads and then i think just passes them on to the redgate procedure to do the sql compare.

    this is the XML entry for the ignore no check:
    <Option>IgnoreWithNocheck</Option>

    does this look like the correct value to trigger the Ignore No check in the compare?
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    If you use your own XML file to store the options then I cannot say whether or not the XML snippet is correct without seeing the code. Like I said though -- if you have code like this more than likely it's going to break when you upgrade to 10.7. The bit that turns the XML config file into options is definitely going to need to change.
  • resolution update.
    it turns out that the developer made an error in the new code.. after fixing the code, the option to ignore 'with nocheck' is properly being ignored in our sqlCompares.
    thanks...
Sign In or Register to comment.