Category Archives: SQL 2016

A SQL Read with NOLOCK, Causes a ALTER Table DDL statement to be Blocked or to Fail

If you are using SQL table hint NOLOCK, you would expect that this hint would always be honoured. However when reading data from a table this will always cause a schema stability lock (Sch-s); even when the NOLOCK hint is … Continue reading

Posted in SQL 2008 R2, SQL 2016 | Tagged | Leave a comment

How to Get a SQL String Variable to be Larger Than 4000 Characters or 8000 Characters for Dynamic SQL

Sometimes desperate messages are required because SQL Server parameterisation does not work (i.e. can’t use a variable in place of a table name). Recently I was constructing some dynamic SQL and the code was failing execution because the SQL dynamic … Continue reading

Posted in SQL 2008 R2, SQL 2016, Uncategorized | Tagged | Leave a comment