Labels

Tuesday, 10 September 2019

How to avoid blockings with read committed snapshot on at DB level in SQL Server

 if you are having problem with blocking between readers (SELECT) and writers (INSERT/UPDATE/DELETE), then you can enable this property without changing anything from the application. Which means application would still run under read committed isolation and will still read only committed data.

ALTER DATABASE <DB_NAME> SET READ_COMMITTED_SNAPSHOT ON WITH ROLLBACK IMMEDIATE

SQL Server 2005 on wards, SQL engine provides only one new isolation level and an optimistic implementation of READ COMMITTED. Isolation level SNAPSHOT is a new isolation level and READ COMMITTED SNAPSHOT is the same isolation level as READ COMMITTED but is the optimistic implementation of it.

No comments:

Post a Comment