How can I change the deadlock priority for a Sql Server 2012 Enterprise maintenance task that is created and configured using the GUI wizard?

I.e. There is a maintenance plan with an "rebuild index of all tables of XY" or "reorganize index of all tables of XY" subtask, which was created using the maintenance plan wizard of Sql Server Management Studio.

I know I can change the deadlock priority for a transaction by executing SET DEADLOCK_PRIORITY LOW, but where would I insert such a command?

If at all possible I would like to avoid abandoning the GUI subtasks in favor of some sort of stored procedure or script. Noone here, including me, has the expertise to maintain such a script.

From my research so far, it seems like setting the priority for a gui task is simply not possible. If this is true, I still would appreciate a definitive answer confirming this, so I can stop searching.

  • While I don't think there is an option to control the deadlock priority of a mantenance plan via the GUI, you 'might' want to consider going into the Sql Server Agent job that is generated for the maintenance plan and increasing the retry attempts in the Steps/Subplan/Advanced section. Commented Mar 1, 2017 at 11:53
  • My concern is not when the maintenance task fails (it will just be done the next time) but that many other queries may be deadlocked because of it. So I want to lower its priority, not retry it more often.
    – HugoRune
    Commented Mar 1, 2017 at 12:03

1 Answer 1


Try adding an Execute T-SQL Statement Task at the beginning of your maintenance plan

With the following statement in it :


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.