Set SQL Server Isolation Level

From SMTX Wiki
Revision as of 21:44, 25 May 2020 by Smtxwiki (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Set snapshot isolation level on
Make sure all the connections to the database are closed!
ALTER DATABASE MyDB
SET ALLOW_SNAPSHOT_ISOLATION ON

ALTER DATABASE MyDB
SET READ_COMMITTED_SNAPSHOT ON
Check the isolation level
dbcc useroptions;
Set snapshot isolation level off (in case you have bad performance when turned on)
ALTER DATABASE MyDB
SET ALLOW_SNAPSHOT_ISOLATION OFF

ALTER DATABASE MyDB
SET READ_COMMITTED_SNAPSHOT OFF