Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Session 1
- CREATE DATABASE RCSITest
- GO
- ALTER DATABASE RCSITEST SET READ_COMMITTED_SNAPSHOT ON
- GO
- USE RCSITEST
- GO
- CREATE TABLE [Foo] (a int, b varchar(10))
- /*
- Create a clustered index to make sure whatever behavior you see isn't just some weird heap issue
- */
- CREATE CLUSTERED INDEX IX_Foo ON Foo (a)
- GO
- INSERT INTO Foo (a, b) VALUES ( 1, 'Foo')
- GO 100000
- -- Read table and leave tran open
- BEGIN TRAN
- SELECT * FROM Foo
- --COMMIT
- -- Session 2
- UPDATE Foo SET a = 2, b = 'Bar' WHERE a <> 99
- -- Session 3
- select * from sys.dm_tran_top_version_generators
- select COUNT(*) from sys.dm_tran_version_store
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement