I am studying snapshot isolation level of SQL Server 2008 from the below link. My confusion is,
http://msdn.microsoft.com/en-us/library/ms173763.aspx
It is mentioned "Data modifications made by other transactions after the start of the current transaction are not visible to statements executing in the current transaction." -- seems data committed by other transactions are not visible to the current snapshot isolation level transaction;
It is mentioned "A transaction running under SNAPSHOT isolation level can view changes made by that transaction." -- seems data committed by other transactions are visible to the current snapshot isolation level transaction.
Seems 1 and 2 are conflicting? Any comments?
thanks in advance, George
Number 2 means "I can see my own changes; I can't see other changes"
So if I start a transaction and I make changes, I can see them. Other transactions for other sessions/connections started after my TXN can not see my changes
You also need to know the difference between SNAPSHOT and READ COMMITTED SNAPSHOT - for the latter, you need to modify your quote from BOL as follows:
"Data modifications made by other transactions after the start of the current STATEMENT (not transaction!) are not visible to statements executing in the current transaction."
An example of a case when it makes a big difference: When Snapshot Isolation Helps and When It Hurts
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With