Feature Request : Add Custom Code to Synchronisation Script

howarthcdhowarthcd Posts: 69 Bronze 3
edited July 8, 2010 9:51AM in SQL Compare Previous Versions
It would be nice to have the facility to add custom code into the generated synchronisation script, and for the code to be wrapped in the transaction and error handling

For instance, we use SQL Compare to generate a single database release script, but then add in code at the end for the manipulation of reference data, and a call to a stored proc to increment a stored database version number. This all has to be added manually once the synchronisation script has been created, and is often fiddly as we have to replicate the transaction and error handling.

It would be useful if SQL Compare could capture custom code and then incorporate it at the end of any auto-generated DDL statements, perhaps in a TRY/CATCH block to simplify error handling.

I appreciate that this could be performed using SQL Multi-Script, but we would prefer to have a single SQL script for the entire release.

Thanks
Chris

Comments

  • Thanks for raising this request. This is something we're already considering.

    Would you want your post-deployment script to be placed just before the end of the transaction?

    Can you confirm that there's nothing you need to put in your post-deployment script that isn't transactionable or needs to be put after the transaction?

    Regards,

    David Atkinson
    Product Manager
    Red Gate Software
    David Atkinson
    Product Manager
    Redgate Software
  • howarthcdhowarthcd Posts: 69 Bronze 3
    T
    Would you want your post-deployment script to be placed just before the end of the transaction?

    Can you confirm that there's nothing you need to put in your post-deployment script that isn't transactionable or needs to be put after the transaction?

    Hi David

    Thanks for your reply.

    We would need to add the code just before the end of the transaction - typically we would insert reference data into tables created earlier on in the script.

    Currently there's nothing that we would want do in the proposed custom section that isn't 'transactionable', although I guess that the option to place the code inside or outside the transaction would be useful to some - maybe even providing two code entry points (one for inside the transaction, and one for outside the transaction) would offer more flexibility.

    Regards
    Chris
  • Thanks for the further detail. Unless someone gives us a good example of something they might want after the end of the transaction, we'll assume it's not required. We try not to add unnecessary complexity.

    David
    David Atkinson
    Product Manager
    Redgate Software
  • howarthcdhowarthcd Posts: 69 Bronze 3
    Thanks for the further detail. Unless someone gives us a good example of something they might want after the end of the transaction, we'll assume it's not required. We try not to add unnecessary complexity.

    David

    No worries.

    You mentioned that this is something that is already being considered - has an expected delivery date yet been decided?

    Thanks
    Chris
  • It's too early to say.

    I suspect that the topic will come up a lot now that we've got SQL Source Control as an underlying platform to deploy from. I anticipate users will want to know how to deploy seamlessly from this in an automated fashion.

    David
    David Atkinson
    Product Manager
    Redgate Software
Sign In or Register to comment.