In Azure Synapse Analytics : Inner error code: TriggerEnabledCannotUpdate Message: Cannot update enabled Trigger; the trigger needs to be disabled first.

Anonymous
2023-11-14T12:51:32.5933333+00:00

My Requirement is to update the Existing trigger and create another Trigger .

Below are the steps I did in Azure Synapse analytics.

  1. I Created a working branch.I renamed the Existing trigger and created another triggers and now i have two triggers in my working branch.
  2. I created a Pull request and changes are moved successfully into collaboration branch.
  3. After moving changes to collaboration branch.I hit publish button in Main branch.Once i hit publish button it is throwing error like

Error code: OK

Inner error code: TriggerEnabledCannotUpdate

Message: Cannot update enabled Trigger; the trigger needs to be disabled first.

Could you someone please help me on this?

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,373 questions
0 comments No comments
{count} votes

Accepted answer
  1. AnnuKumari-MSFT 34,556 Reputation points Microsoft Employee Moderator
    2023-11-16T10:00:04.1633333+00:00

    Hi SrikarV ,

    Thankyou for putting effort and sharing the approach for resolving the issue.

    Glad that you figured out the way to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer.

    Below are the steps you have performed in order to resolve the issue you were facing:

    • Re-added the deleted trigger under the trigger folder(In devops git).
    • After adding the trigger, detached the trigger from the Pipeline
    • After detaching the trigger from the pipeline , deleted the trigger and then published and the changes are reflected in ARM template .

    Kindly accept the answer by clicking on Accept answer button so that the solution reaches the community in case anyone is facing similar issue. Thankyou.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Amira Bedhiafi 33,071 Reputation points Volunteer Moderator
    2023-11-14T15:03:48.37+00:00

    You need to disable the trigger that you want to update, through the Azure Synapse Analytics UI or via a script.

    The Stop-AzSynapseTrigger cmdlet stops a trigger in a workspace. If the trigger is in the 'Started' state, the cmdlet stops the trigger and no longer invokes pipelines. If the trigger is already in the 'Stopped' state, this cmdlet has no effect.

    https://learn.microsoft.com/en-us/powershell/module/az.synapse/stop-azsynapsetrigger?view=azps-10.4.1

    Once the trigger is disabled, you can proceed to make the necessary updates.

    After updating the trigger, you'll need to re-enable it.

    The Start-AzSynapseTrigger cmdlet starts a trigger in a workspace. If the trigger is in the 'Stopped' state, the cmdlet starts the trigger and it eventually invokes pipelines based on its definition. If the trigger is already in the 'Started' state, this cmdlet has no effect.

    https://learn.microsoft.com/en-us/powershell/module/az.synapse/start-azsynapsetrigger?view=azps-10.4.1


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.