Disable DML triggers while updating static data (Deploy database changes from a release artifact)
banemeth
Posts: 2 New member
Hello,
Azure DevOps - Redgate SQL Change Automation: Release task.
Currently stucked on a step, when static data updates on target server, a DML trigger fires, and change some data (ex. last change time) and then post schema validation failes, because of differencies.
In "SQL Data Compare" tool there are an existing option to "Disable DML triggers" in "Deployment behavior" but in SQL Source Control there is no existing options for that.
I can manually disable/enable all triggers on a database (via pre and post deployment script), but when both schema and data changes on same table this is not work, because trigger dropped and created (as enabled) before static data changes.
Any help could be approciated!
Regards:
Nemeth Balazs
Azure DevOps - Redgate SQL Change Automation: Release task.
Currently stucked on a step, when static data updates on target server, a DML trigger fires, and change some data (ex. last change time) and then post schema validation failes, because of differencies.
In "SQL Data Compare" tool there are an existing option to "Disable DML triggers" in "Deployment behavior" but in SQL Source Control there is no existing options for that.
I can manually disable/enable all triggers on a database (via pre and post deployment script), but when both schema and data changes on same table this is not work, because trigger dropped and created (as enabled) before static data changes.
Any help could be approciated!
Regards:
Nemeth Balazs
Best Answer
-
Sergio R Posts: 610 Rose Gold 5Hi Nemeth,
You can use SQL Data Compare options in the Azure DevOps addon, have you already tried that?Sergio
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
Answers
Thank you for your help, it works!
https://documentation.red-gate.com/sdc13/using-the-command-line/command-line-syntax/options-used-in-the-command-line
Regards
Balazs Nemeth