Troubleshooting Guide: Error 2755 – Invalid SET DEADLOCK_PRIORITY Option
Why This Error Happens
This error occurs when the SET DEADLOCK_PRIORITY statement is passed a value that does not match the parser’s accepted syntax, which is strictly limited to the keywords HIGH, NORMAL, LOW, or an integer literal between -10 and 10. In most cases, this is triggered by application code or legacy scripts sending a string, a variable of the wrong data type, or an out-of-range integer directly to the session option. Occasionally this surfaces after migrating databases to SQL Server 2025, where stricter T-SQL parsing rules expose syntax that older engine versions silently tolerated.
Step-by-Step Resolution Guide
Step 1: Locate the Offending T-SQL Statement
- Check the SQL Server error log or Extended Events session for the exact query text that triggered Error 2755.
- Look specifically for lines containing
SET DEADLOCK_PRIORITYin stored procedures, triggers, or application connection strings. - Use
sys.dm_exec_sql_textcombined with a recent query hash if the session has already disconnected.
Step 2: Correct the Syntax to a Valid Value
- Replace any invalid keyword or string with one of the accepted literals:
HIGH,NORMAL, orLOW. - If using a numeric value, ensure it falls strictly within the range of -10 to 10 (e.g.,
SET DEADLOCK_PRIORITY 5;). - Remove any quotation marks around the keyword, since
SET DEADLOCK_PRIORITY 'HIGH'is invalid — it must beSET DEADLOCK_PRIORITY HIGH;.
Step 3: Audit Application and ORM-Generated Code
- Search connection pooling or ORM frameworks (Entity Framework, Hibernate, Dapper) for dynamically injected session settings.
- Confirm that no configuration file or environment variable is passing a non-integer string (like
"VeryHigh") into the deadlock priority parameter. - Update any stored procedure parameters so the data type matches
smallintor a validated string constrained to the three keywords.
Step 4: Test in Isolation Using SSMS
- Open a new query window in SQL Server Management Studio connected to the Windows Server 2025 instance.
- Run the corrected statement alone, e.g.:
SET DEADLOCK_PRIORITY LOW;
- Confirm no error is returned before reintegrating the fix into the full script or application.
Alternative or Verification Steps
- Re-run the original transaction or stored procedure that failed and confirm Error 2755 no longer appears in the SQL Server error log or client application output.
- If the error persists, check for mixed-mode scripts where
DEADLOCK_PRIORITYis set via a dynamically built SQL string (EXEC(@sql)) — concatenation errors here often reintroduce invalid values even after direct code fixes.