SET DEADLOCK_PRIORITY
deadlock victim preference
What changes
- Input
- none
- Output or change
- session state
Syntax at a glance
SET DEADLOCK_PRIORITY { LOW | NORMAL | HIGH | <numeric-priority> | @deadlock_var | @deadlock_intvar }
Work example
A session workflow needs the specific behavior of SET DEADLOCK_PRIORITY for a bounded operation.
Record the starting session state, set the option only for the operation, and restore the documented default before returning a pooled connection.
Check your work SET DEADLOCK_PRIORITY. The operation follows the intended SET DEADLOCK_PRIORITY behavior and the next task sees the expected session state.
Open Microsoft Learn for full syntax, permissions, and details for your version.