What are the challenges you face when working across database platforms? Take the survey
Options

Running multiple compare scripts in sequence within app.

Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
edited September 16, 2004 8:09AM in SQL Compare Previous Versions
Hi Chiefley,

It looks like you could do what you need to do by commenting out the COMMIT TRANSACTION at the end of the first script and also the BEGIN TRANSACTION near the top of the second script. This should get both scripts together as one transaction that will only commit if both scripts run successfully.

It will also cause the ROLLBACKs to affect both scripts as well.

You'd want to concatenate the script files into one unless you can run both script files through the same connection to the SQL database.

Comments

  • Options
    Hi,

    That should do it. As long as the connection stays open, the server should only commit the transaction when it gets the COMMIT TRAN from the final script, provided there is a BEGIN TRAN at the top of the first script.
This discussion has been closed.