Thank you @Thom A, @GSerg, and @Dai for the helpful clarifications and suggestions especially for identifying that the root cause lies in the SQL query generated by the third-party client and for suggesting the TDS proxy workaround.
The error Table hint NOLOCK is not allowed
occurs when a third-party application tries to query an Azure Fabric SQL Database using the WITH (NOLOCK)
table hint.
Azure Fabric SQL (SQL endpoint of Microsoft Fabric) does not support NOLOCK
or other unsafe table hints (READUNCOMMITTED
) to maintain data consistency and isolation guarantees in its distributed architecture.
This issue cannot be fixed from the Azure SQL side. Instead, it must be addressed on the 3rd party application side, where the SQL query is constructed or passed to the engine.
If you have control over the 3rd party application's source code or configuration, then firstly Locate and update any queries like:
SELECT * FROM dbo.MyTable WITH (NOLOCK)
Then Replace them with:
SELECT * FROM dbo.MyTable
If applicable, remove any setting that globally injects READUNCOMMITTED
or similar behavior.
And, If You Do Not Control the Application Code then as @Dai pointed out, you can insert a TDS proxy between the application and the database. This proxy can rewrite SQL queries in-flight