How can we help you today? How can we help you today?

SQL Compare order of clauses

Is there any way to keep the order of clauses that are exported with a compare. I notice that if I just add a new table or stored proc and rerun a sql compare (I have an automatic, command line one running within my build) that the order of clauses in the exported script is totally different than the previous one. Is it not possible to keep the order consistent, fallback would be the name of the object being exported maybe?
mika76
0

Comments

6 comments

  • Allen LeVan
    Hello,

    Unfortunately there is no way to keep the order between deployments, there is no information passed from one running of SQL Compare to the next. If the objects stay the same the order should but as you've noticed if you add objects then it will change when incorporating those.
    Allen LeVan
    0
  • mika76
    Can you maybe explain why a simple dependency then alphabetical order would not work?
    mika76
    0
  • mika76
    Actually I notice that it's only happening with the command line tool. when I run the following
    "c:Program FilesRed GateSQL Compare 10SQLCompare.exe" /scripts1:"..ADatabase" /scripts2:"..APreviousDatabase" /scriptfile:"C:Builds2A_PatchComparisonBinaries\patch.sql" /Include:Identical
    

    It gives me a nice script which I can use or save for future, but if I run the same thing twice, with no changes at all, the whole script is in a different order, so if I look at it in a comparison tool I get gibberish.

    Going through the UI, where you select the items to script, the script comes out the same each time it seems. So this seems to be a problem with the command line tool specifically (The UI seems to order by dependency, then by alphabetical as mentioned in previous post)
    mika76
    0
  • mika76
    Bump - anyone?
    mika76
    0
  • mika76
    Bump - come on guys - it's a simple question...
    mika76
    0
  • sam.blackburn
    mika76 wrote:
    "c:Program FilesRed GateSQL Compare 10SQLCompare.exe"
    

    We made SQL Compare significantly more deterministic between versions 10.4 and 11. You might have better luck if you try upgrading, at least in the cases where the database has not changed.
    sam.blackburn
    0

Add comment

Please sign in to leave a comment.