SQL2008: Read committed snapshot

I was just told not to use

READ UNCOMMITTED also called dirty read in SQL 2008. A new possibilty exists:

READ COMMITTED SNAPSHOT

The problem with the first one is that if conn A reads a large bit, conn B do update, conn A reaches the updated bit and reads that, conn B rolls back, then conn A got illegal data.

If using the snapshot read, then conn A reads only on a snapshot as long as conn B is doing update. This snapshot contains the before transaction data.

This makes sence because had connection B just been a little later, then it would have been the same situation as with the snapshot option.

Thanks to Jesper Johansen

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: