T-SQL ENHANCEMENTS Table 7-2: Versioning Database at SERIALIZABLE

T-SQL ENHANCEMENTS Table 7-2: Versioning Database at SERIALIZABLE Isolation Step User 1 User 2 1 BEGIN TRAN SELECT name FROM tab WHERE id = 1 **value is Name 2 BEGIN TRAN UPDATE tab SET name = Newname WHERE id = 1 3 SELECT name FROM tab WHERE id = 1 **value is Name 4 COMMIT 5 SELECT name FROM tab WHERE id = 1 **value is Name 6 COMMIT 7 SELECT name FROM tab WHERE id = 1 **value is NewName ALTER DATABASE pubs SET ALLOW_SNAPSHOT_ISOLATION ON GO USE pubs GO SET TRANSACTION ISOLATION LEVEL SNAPSHOT BEGIN TRANS SQL Expressions COMMIT TRANS The SQL expression in the preceding batch will be executed, in effect, against a snapshot of the database that was taken when BEGIN TRANS was executed. Statement-level SNAPSHOTisolation requires the use of an additional database option, READ_COMMITTED_SNAPSHOT. If this database option and ALLOW_ SNAPSHOT_ISOLATIONare ON, all transactions done at the READ UNCOMMITTED or READ COMMITTED levels will be executed as READ COMMITTED level

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Tomcat Web Hosting services

Bookmark the permalink.

Comments are closed.