0

I have always understood isolation levels in context of read operations because all the books and articles i read always explained isolation levels in the read context.

I am trying to understand IsolationLevel and its implication for inserts.

Thanks.

Sameer
  • 3,124
  • 5
  • 30
  • 57

1 Answers1

1

since you're inserting data, and an exclusive lock is always needed, the read uncommitted isolation level does not affect this kind of statement.

As you may already know, the processes that try to read from the resource on which you're inserting, if they're under the read uncommitted isolation level, can read the uncommitted version of the record. Additionally, if a page-split occurs, duplicate rows can be displayed.

However, you can read also this good post about the read uncommitted isolation level on reading scenario: Why use a READ UNCOMMITTED isolation level?

Community
  • 1
  • 1
Alessandro Alpi
  • 368
  • 1
  • 6
  • Unless his INSERT statement also contains SELECT statements, either for individual column values or for whole rows. In that case it will matter, but not for the INSERT part. – Lasse V. Karlsen Jul 18 '14 at 09:48
  • You're right. In that case he can specify also NOLOCK hint for each table which needs the uncommitted isolation level instead of SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED. However it seems that he's speaking aobut .net setting, maybe a TransactionScope setting. – Alessandro Alpi Jul 18 '14 at 09:53
  • Does this mean pure insertions(without select) are unaffected by isolation levels ? – Sameer Jul 18 '14 at 10:08