Monthly Archives: April 2018

Snapshot isolation level when database is set to read only.

Recently there was a question posted on #sqlhelp about why a database switched to Snapshot isolation level when you make it read only and then reverts back to read committed mode when its switched back to read write. You can use the below script to recreate the behavior being described [codesyntax lang=”tsql”] if exists (select… Read More »

Cannot use row granularity hint on the table

Got approached with the below error message recently and thought it might be an interesting problem to look into. ProgrammingError((\’42000\’, 651, \'[Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot use the ROW granularity hint on the table “XXXXXX” because locking at the specified granularity is inhibited.\’, 11159)  The client faces this issue when they implement a clustered… Read More »

#sqlhelp | should you remove indexes from tables before ETL?

Starting today we are introducing a new type of blog content which covers questions from #sqlhelp. We pick random questions from the feed and try to cover them in detail, while trying to explore other options or scenarios that might not be so obvious. The Questions is should you remove the index before doing ETL?… Read More »