We are attempting to create a DML script that contains a transaction that we want to rollback pending failure. However, we are seeing the following message:
Error while parsing script '......'. Usage of Transaction statements is not permitted unless using TransactionHandling='Custom' metadata setting.Do you still want to mark the script as deployed?
Where do I make the change in our code to set that metadata tag? Also, do you have a list of these settings to avoid something like this in the future?
By default, ReadyRoll will wrap all of your Deploy-Once and Deploy-Change migrations in a transaction, and during deployment will automatically perform a rollback if an error occurs.
However if you would like to issue a ROLLBACK yourself, or otherwise override the automatic transaction handling behavior, you can do so by including such logic within a TRY / CATCH block in your migration script.
You can also disable the automated transaction handling all together by adding the TransactionHandling=“Custom” property to your script’s header (ie. in the <Migration/> tag).
For more information, please see this blog post:
This question has received the maximum number of answers.