Solved

between SERIALIZABLE and SNAPSHOT

Posted on 2011-03-23
5
334 Views
Last Modified: 2012-05-11
Hey experts, I've read about
 SET TRANSACTION ISOLATION LEVEL (Transact-SQL)
 http://msdn.microsoft.com/es-es/library/ms173763 (v = SQL.100). aspx
but i do not understand
 I would like to know the difference between SERIALIZABLE and SNAPSHOT
0
Comment
Question by:enrique_aeo
  • 2
  • 2
5 Comments
 
LVL 14

Assisted Solution

by:Daniel_PL
Daniel_PL earned 125 total points
ID: 35197300
0
 
LVL 142

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 125 total points
ID: 35197310
SNAPSHOT will take a snaphshot of the table(s) involved for the transaction, so you will keep to get the same information, whatever the other sessions are doing. the other sessions are not blocked whatsoever
SERIALIZABLE will block/delay all the others to do anything on the same objects you lock until your transaction is completed. this is a very strong locking, and needs to be used carefully
0
 

Author Comment

by:enrique_aeo
ID: 35197462
angelIII... the SNAPSHOT need more space to do their SNAPSHOT?
 and when you delete that copy?. Could you explain a little more about SNAPSHOT
0
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 125 total points
ID: 35197474
the snapshot is only "virtual", means that there is no snapshot data unless you try to access tables which are getting modified (by other processes). in short, the snaphot is only a list of data blocks that have been modified since you started the "snapshot transaction", so as long as the transaction is short, there will be almost no "changes" stored for "your snapshot".
0
 
LVL 14

Assisted Solution

by:Daniel_PL
Daniel_PL earned 125 total points
ID: 35197520
In Snapshot Isolation level updated row versions for each transaction are maintained in TempDB.
After transaction has begun, it ignores all the newer rows inserted or updated in your table.
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Suggested Solutions

In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now