????SNAPSHOT?????????????????????????????3????????????汾????????3?????????????????????д??????????????????????????????????????????
????????????1??????ж??????
????BEGIN TRAN;
????SELECT productid?? unitprice FROM Production.Products WHERE productid = 2;
??????????2?и????????
????BEGIN TRAN;
????UPDATE Production.Products SET unitprice += 1.00 WHERE productid = 2;
????COMMIT TRAN;
?????????????1??????????????????????
????UPDATE Production.Products SET unitprice = 21.00 WHERE productid = 2;
????COMMIT TRAN;
???????????????????????????????3??????????????£?
??????? 3960?????? 16???? 2???? 1 ??
?????????????????????3?????????????????????'AdventureWorks2012'??????????????????????? 'Production.Products'???????????????????????????????????????С???????????????? update/delete ?????????
????READ COMMITED SNAPSHOT
????READ COMMITED SNAPSHOT???????а汾??????????????SANPSHOT??????????????????“???”???????????????а汾???????????????????????????а汾?????????????????3???????????????????????????????????????????????????????????????
???????????????????????READ COMMITED SNAPSHOT?????????
????ALTER DATABASE dbname SET READ_COMMITED_SNAPSHOT ON;
?????????????????????????READ COMMITED SNAPSHOT
??????????1????????????
????BEGIN TRAN;
????UPDATE Production.Products SET unitprice += 1.00 WHERE productid = 2;
????SELECT productid?? unitprice FROM Production.Products WHERE productid = 2;
???????к??????
????productid   unitprice
????----------  ----------
????2            20.00
??????????2?У???????????????????2????????????????
????BEGIN TRAN;
????SELECT productid?? unitprice FROM Production.Products WHERE productid = 2;
???????к?????????汾??
????productid   unitprice
????----------  ----------
????2            19.00
??????????????1????????
????COMMIT TRAN;
?????????????????а汾??????仯??20.00????????????????2????ζ?????2???????????????
????SELECT productid?? unitprice FROM Production.Products WHERE productid = 2;
????COMMIT TRAN;
?????????????£?
????productid   unitprice
????----------  ----------
????2            20.00