DEADLOCK_PRIORITY

Posted on : 16-05-2012 | By : Devi Prasad | In : Dead Lock

Share:

0


DEADLOCK_PRIORITY is used to specify the priority of a session when deadlocked by other session.
The session that has lower DEADLOCK_PRIORITY will be chosen as a victim for deadlock.

Dead Lock

Syntax:

SET DEADLOCK_PRIORITY value

Value Can Be:
LOW
NORMAL
HIGH
Numeric value from -10 to 10

Example:
To set HIGH DEADLOCK_PRIORITY to a connection:

SET DEADLOCK_PRIORITY HIGH

OR

SET DEADLOCK_PRIORITY 5

OR

DECLARE @A VARCHAR(10)
SET @A = 'HIGH'
SET DEADLOCK_PRIORITY @A

OR

DECLARE @A INT
SET @A = 5
SET DEADLOCK_PRIORITY @A

Note:
Numeric equivalent values of DEADLOCK_PRIORITY.
HIGH = 5
NORMAL = 0
LOW = -5

Applicable to SQL Server 2000,SQL Server 2005,SQL Server 2008,SQL Server 2008 r2,SQL Server 2012

(Visited 2,151 times, 1 visits today)



References : Devi Prasad (sqlserverlearner.com)

Need Help On SQL Server?

Cannot Find Solution to your problem (or) If you are looking for some help on SQL Server. Dont worry Click Here to Post your question and solve your issue.


Do you like my blog?

If you liked reading this blog, please help spread the word by sharing this blog with your friends.




Write a comment



Tags: , , , , , , ,