Transaction Isolation Level Scopes

后端 未结 6 1384
醉话见心
醉话见心 2020-12-24 05:37

What are the scoping rules for transaction isolation levels in SQL Server 2005? I know what the different levels mean, but not how to properly apply them outside of a manual

6条回答
  •  天涯浪人
    2020-12-24 06:10

    From MSDN

    If you issue SET TRANSACTION ISOLATION LEVEL in a stored procedure or trigger, when the object returns control the isolation level is reset to the level in effect when the object was invoked. For example, if you set REPEATABLE READ in a batch, and the batch then calls a stored procedure that sets the isolation level to SERIALIZABLE, the isolation level setting reverts to REPEATABLE READ when the stored procedure returns control to the batch.

提交回复
热议问题