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

Why This Error Happens

Error 4144 occurs because SQL Server does not support table hints (such as NOLOCK, INDEX, or ROWLOCK) when the target of an INSERT statement is a remote or linked server table. This limitation exists because the query optimizer cannot push locking or indexing directives across the network boundary to a remote provider, as the remote instance manages its own execution plan and locking behavior. The error is almost always triggered by application code or stored procedures that were migrated from local-table logic without accounting for the linked server syntax restrictions.

Step-by-Step Resolution Guide

Step 1: Identify the Offending Query

  • Capture the exact T-SQL statement from the application log or SQL Server error log that references Error 4144.
  • Use SQL Server Profiler or Extended Events (xEvents) on the Windows Server 2025 instance to trace the batch text containing the INSERT INTO [LinkedServer].[Database].[Schema].[Table] syntax.
  • Confirm the hint (e.g., WITH (ROWLOCK)) is attached directly to the remote table reference.

Step 2: Remove or Relocate the Table Hint

  • Edit the stored procedure or ad-hoc query to strip the hint from the remote INSERT target, for example changing:
    INSERT INTO [LinkedServer]...[Table] WITH (ROWLOCK) SELECT * FROM LocalTable
    to:
    INSERT INTO [LinkedServer]...[Table] SELECT * FROM LocalTable
  • If locking behavior is required, apply the hint to the source table instead, since hints are only disallowed on the remote insert target, not on local source tables.

Step 3: Validate Linked Server Configuration

  • Open SQL Server Management Studio (SSMS) and navigate to Server Objects > Linked Servers to confirm the provider (e.g., SQLNCLI, MSOLEDBSQL) supports the operation being attempted.
  • Run EXEC sp_serveroption 'LinkedServerName', 'rpc out', 'true'; if remote procedure calls are needed instead of direct INSERT statements.
  • Deploy the corrected procedure to a test environment running Windows Server 2025 to confirm the query compiles without Error 4144.

Step 4: Refactor Using a Staging Table (If Hints Are Required)

  • If query hints are mandatory for performance tuning, insert data into a local staging table first using the hint.
  • Then run a second, hint-free INSERT statement from the staging table to the remote linked server table.

Alternative or Verification Steps

  • Re-run the corrected stored procedure or query in SSMS and confirm it executes without throwing Error 4144 in the Messages tab.
  • If the error persists, check whether the remote table is referenced via synonym or view, as hidden hints embedded in underlying view definitions can also trigger this error indirectly.