question

Raj More avatar image
Raj More asked

Isolation Levels

For reading dirty data you can set isolation levels at a Connection level using

SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

Do any of these help with locking / blocking issues at a global level?

ALTER DATABASE MyDatabase
SET ALLOW_SNAPSHOT_ISOLATION ON

or

ALTER DATABASE MyDatabase
SET READ_COMMITTED_SNAPSHOT ON
t-sqltransactionlockingblockingisolation-level
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Tom Staab avatar image
Tom Staab answered

I added tags for transaction and isolation-level to your question. There are some good answers in some of the previous questions:

What is snapshot isolation?

Which row-versioning transaction isolation level do you use?

Transaction Types in SQL Server 2005

short answer: Yes, both help by reducing the need for locking but both also increase usage of tempdb.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Tom Staab avatar image Tom Staab ♦ commented ·
Just to clarify, those options are not for dirty reads. They are used to avoid lock/block issues when dirty reads are unacceptable.
2 Likes 2 ·
Matt Whitfield avatar image Matt Whitfield ♦♦ commented ·
Good answer as usual, sir.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.