When does the line version start?
When we find that there are a lot of read/write blocking in the system, it is time to turn on the line version. Important: Write blocking scenario line version technology can not solve
Open mode:
--set to single user alter DATABASE MyTest set Single_user with ROLLBACK IMMEDIATE; go--Open row version (transaction level) ALTER DATABASE MyTest SET allow_snapshot_isolation on; go--Open Statement-level row version ALTER DATABASE MyTest set READ_COMMITTED_SNAPSHOT on with no_waitgo--set to multi-user ALTER DATABASE MyTest set Multi_u SER with ROLLBACK IMMEDIATE; GO
To turn on statement-level row versioning note points:
if Read_ Committed_snapshot is set to ON, the database engine uses row versioning to provide a transactionally consistent snapshot of the data for each statement, The downside is that the user is reading a data value that is not a dirty data, but is likely to expire immediately after being modified. If data modifications are made based on this expired value, a logic error is generated.
SQL Server Row version control