Sql-server – How to set the deadlock priority for a maintenance task created trough the graphical interface

deadlocksql serversql-server-2012

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.

Best Answer

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

With the following statement in it :

SET DEADLOCK PRIORITY NORMAL