SQL Compare Command Line Tool's include StaticData option

SQL Compare command line tool's help/documentation shows that there is an include option to include static data differences
  • /include:StaticData

From the documentation:



...




Given this, my question is as follows: 

does it really supposed to work? I am not able to see the static data differences in the output even though I use the /include option. 

Also, I attempted to use /reportAllObjectsWithDifferences option; however, that also does not work for me.

I know that SQL Data Compare exists for determining data differences and therefore I assume sqldatacompare command line tool supports seeing static data differences. If this is the case, should I expect SQL Compare to support seeing static data differences? (It would be nice of course if it did but I assume RedGate separated these functionalities into different tools; but may be I am wrong).

So, does the sql compare documentation have a bug with the /include option? Or am I making something wrong since I cannot see the static data differences via SQL Compare that I can see via SQL Source Control.

By the way, what would be the equivalent option in the SQL Compare UI for the /include:StaticData, since I cannot see any option to click for this. The only thing I see is "Objects with differences" but I assume that corresponds to /reportAllObjectsWithDifferences option, not the /include:StaticData option.


Tagged:

Best Answer

  • Michelle TMichelle T Posts: 566 Gold 1
    /include:StaticData should include the static data in the deployment script output if your source is a SQL Source Control scripts folder.

    It won't include the static data in any reporting, and there's no SQL Compare UI equivalent - it's really just there to simplify automation so that you don't have to use two different command lines when deploying with static data from SQL Source Control.

    I'll attempt to make it clearer in the documentation.

    What were your expectations of the /reportAllObjectsWithDifferences flag that it did not satisfy?
    Software Developer
    Redgate Software

Answers

  • Thank you for your quick answer.

    Is /include:StaticData then only useful for scenarios where we also use /synchronize as an optin?

    Is there a reason why reports do not contain the differences?

    We have an automation task to check any discrepancies between the database and the source control files.

    We run a script to do this and we generate html reports from sqlcompare.

    However, the reports do not contain the static data differences; therefore, I am wondering if I need to update my script to also use sqldatacompare in addition to sqlcompare so that we can see both types of differences?

    Or is there another way?

    When you say deployment script output, does that show any differences or it only contains the final information that needs to be deployed?


  • Yes, it's only useful for scenarios with /synchronize - the reports don't contain the information because we haven't had that many requests to update them with static data.

    In your case, you should probably use the SQL Data Compare command line to report on the data differences.

    The deployment script output is just the SQL that would need to be executed to make the changes. You could possibly reconstruct the differences from that, but it sounds like it would just be easier to use both command lines in your case.
    Software Developer
    Redgate Software
  • modernuniversemodernuniverse Posts: 10 New member
    edited February 12, 2019 4:04PM
    Thank you Michelle.

    I have one more question. 

    Then, what does /reportAllObjectsWithDifferences option include in the reports from this list:



    From your earlier response, I understand that, for instance StaticData is not "reported" even if I use the /reportAllObjectsWithDifferences option. Is there anything else that would be missing in the reports from that list even if I used the /reportAllObjectsWithDifferences option.

    The reason I ask is that I am trying to understand what differences my automation may miss.





  • Everything else should be there (apart from identical objects) - it's just Static Data that behaves differently.
    Software Developer
    Redgate Software
Sign In or Register to comment.