Add 2 SQL task in the pipeline to disable/enable the trigger in the destination, see
How to Disable Scheduled Trigger during maintenance time
We have maintenance activities running in SQL database during 12:00 AM EST. During this time, no operations should be done. We have ADF Pipelines which fetches the data from blob's to SQL Server. Is there any way to stop this scheduled trigger for sometime and enable back once the above maintenance activity is done?
4 answers
Sort by: Most helpful
-
-
Samy Abdul 3,376 Reputation points
2023-01-23T12:51:22.7566667+00:00 Hi , please go through below link :
https://stackoverflow.com/questions/67610820/stop-all-azure-data-factory-triggers-through-cli
The other quick not so clean and elegant solution is export the ARM template of the trigger and delete and import through ARM template again. Thanks
-
MartinJaffer-MSFT 26,226 Reputation points
2023-01-23T20:50:33.7266667+00:00 Hello @Phil Prich and welcome to Microsoft Q&A.
Samy Abdul is on the right track; there are various ways of stopping and starting triggers, but I personally would not use ARM templates to do this. ARM template encapsulates so much more than the triggers. It is using a chainsaw when a small knife will do. If you miss, everything else gets hurt.
Also, I imagine you only want certain triggers disabled, not all. Scheduled Triggers can be stopped and started easily. Doing so to tumbling window or event triggers may have repercussions like missed events.
You can manually turn triggers on and off in the Data Factory Studio. (Easiest)
You can use REST API to Stop and Start. (Medium)
You can use Powershell to Stop and Start. (Easy)
You can use Python or .NET SDK's. (Hard)
-
Samy Abdul 3,376 Reputation points
2023-01-24T13:07:13.8+00:00 Hi @Phil Prich , you can use custom activity for your requirement to run power shell script. Below link should help: Thanks