Set SQL Server Isolation Level: Difference between revisions

From SMTX Wiki
Jump to navigation Jump to search
Created page with " '''Set snapshot isolation level on''' <nowiki>Make sure all the connections to the database are closed! ALTER DATABASE MyDB SET ALLOW_SNAPSHOT_ISOLATION ON ALTER DATABASE M..."
(No difference)

Revision as of 18:39, 6 November 2017

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