SQL Compare order of clauses
mika76
Posts: 20
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?
Comments
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.
Red Gate Software
US Product Support
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)
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.
Redgate Software