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 IF EXISTS ( SELECT 1…

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…

The-certificate-chain-was-issued-by-an-authority-that-is-not-trusted-when-conn -FIXED

Interesting little problem came up today when migrating a database from Azure SQL database to local server. The connections sting in the web app had the following property set Encrypt=True; TrustServerCertificate=False   The combination of the two keywords ensures that data transfer from Website to Database server is encrypted using a certificate generated by the…