How to fix Error 8350 on Windows Server 2025 / Windows 11

Troubleshooting Guide: SQL Server Error 8350 – Deprecated NOLOCK/READUNCOMMITTED Hints on UPDATE/DELETE Target Tables

Why This Error Happens

This error occurs because SQL Server 2025 has deprecated the use of NOLOCK or READUNCOMMITTED table hints when applied directly to the target table of an UPDATE or DELETE statement’s FROM clause. These hints were historically ignored by the query optimizer in this context since you cannot read uncommitted data on a row you are actively modifying, making their presence functionally meaningless. SQL Server 2025 now actively flags this syntax to encourage cleanup of legacy T-SQL code before the behavior potentially becomes a hard error in a future compatibility level.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Query

  • Capture the exact statement text from the error message (the %.*ls placeholder will show the specific table name in your actual error log).
  • Use Extended Events or the SQL Server Error Log in Windows Server 2025 to trace which stored procedures or ad-hoc scripts are triggering Event ID 8350.
  • Search your codebase or source control repository for the pattern UPDATE ... FROM ... WITH (NOLOCK) or DELETE ... FROM ... WITH (READUNCOMMITTED).

Step 2: Modify the T-SQL Syntax

  • Open the query in SQL Server Management Studio (SSMS) or Azure Data Studio.
  • Remove the WITH (NOLOCK) or WITH (READUNCOMMITTED) hint specifically from the target table reference in the UPDATE or DELETE clause.
  • If the hint was mistakenly intended for a joined table (not the target), ensure the hint is correctly placed only on the secondary table in the FROM clause, not the table being modified.
  • Example fix: Change UPDATE A SET A.Col = 1 FROM dbo.TableA A WITH (NOLOCK) WHERE... to UPDATE A SET A.Col = 1 FROM dbo.TableA A WHERE....

Step 3: Update Database Compatibility Level (If Applicable)

  • Navigate to SSMS > Object Explorer > Right-click Database > Properties > Options.
  • Verify the Compatibility Level is set to the latest version supported by SQL Server 2025 to ensure deprecation warnings are accurately logged.
  • If you are not ready to change application logic immediately, document the compatibility level setting, as older levels may suppress this specific warning but will not fix the underlying code debt.

Step 4: Deploy and Monitor

  • Push the corrected stored procedures or application code to your staging environment first.
  • Monitor the SQL Server Error Log on your Windows 11 or Windows Server 2025 instance for 24-48 hours to ensure Error 8350 no longer appears in the logs.

Alternative or Verification Steps

  • Verification: Re-run the specific query manually in SSMS after the edit; the deprecation warning (Severity 10, State 1) should no longer populate in the “Messages” tab.
  • Alternative: If removing the hint is not immediately feasible due to a third-party vendor application, use the SQL Server Deprecated Features Extended Events session to filter and suppress this specific alert in monitoring dashboards while you await a vendor patch.