Shared locks acquired for read committed or repeatable read are generally row locks , although the row locks can be escalated to page or table locks if a significant number of the rows in a page or table are referenced by the read 针对read committed或repeatable read获取的共享锁通常为行锁,尽管当读取引用了页或表中大量的行时,行锁可以升级为页锁或表锁。
When the read committed snapshot database option is on , you can use the readcommittedlock table hint to request shared locking instead of row versioning for individual statements in transactions running at the read committed isolation level 当read _ committed _ snapshot数据库选项设置为on时,您可以使用readcommittedlock表提示为read _ committed隔离级别上运行的事务中的各语句请求共享锁,而不是行版本控制。
The following example uses a test scenario in which four concurrent transactions , each identified by a transaction sequence number , are running in a database that has the allow snapshot isolation and read committed snapshot options set to on 下面的示例使用具有四个并发事务的测试方案,每一个事务都由事务序列号( xsn )标识,并在allow _ snapshot _ isolation和read _ committed _ snapshot选项设置为on的数据库中运行。
Applications that were written for sql server 2000 or are new to sql server 2005 , implement read committed isolation using row versioning by specifying the read committed transaction isolation level when the read committed snapshot database option is on 为sql server 2000编写的或sql server 2005中新增的应用程序,通过在read _ committed _ snapshot数据库选项为on时指定已提交读事务隔离级别,来实现使用行版本控制的已提交读隔离。
Most of them support at least two : " read committed " default and " serializable . " use " read committed " when the non - repeatable reads should allow modifications by one transaction to be visible to another between queries ; use phantom reads for modifications made by another transaction to become visible while a query runs 当不可重复读取应该允许在多个查询之间由一个事务作出的修改对于另一个事务可见时,请使用“读取提交” ;要使由另一个事务作出的修改在一个查询运行时成为可见的,请使用幻象读取( phantom read ) 。