How to Disable Scheduled Trigger during maintenance time

Phil Prich 0 Reputation points
2023-01-23T09:35:44.45+00:00

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?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,246 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Olaf Helper 46,041 Reputation points
    2023-01-23T10:29:50.2866667+00:00

    Add 2 SQL task in the pipeline to disable/enable the trigger in the destination, see

    DISABLE TRIGGER (Transact-SQL)

    ENABLE TRIGGER (Transact-SQL)


  2. 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

    0 comments No comments

  3. 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)

    You can use Azure CLI to Stop and Start. (Easy)


  4. Samy Abdul 3,376 Reputation points
    2023-01-24T13:07:13.8+00:00

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.