Aracılığıyla paylaş


ISOLATIONLEVEL

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

The ISOLATIONLEVEL enumeration values specify the isolation levels of a transaction.

Syntax

  
      typedef enum ISOLATIONLEVEL {  
      ISOLATIONLEVEL_UNSPECIFIED      = 0xFFFFFFFF,  
    ISOLATIONLEVEL_CHAOS            = 0x00000010,  
    ISOLATIONLEVEL_READUNCOMMITTED  = 0x00000100,  
    ISOLATIONLEVEL_BROWSE           = 0x00000100,  
    ISOLATIONLEVEL_READCOMMITTED    = 0x00001000,  
    ISOLATIONLEVEL_CURSORSTABILITY  = 0x00001000,  
    ISOLATIONLEVEL_REPEATABLEREAD   = 0x00010000,  
    ISOLATIONLEVEL_SERIALIZABLE     = 0x00100000,  
    ISOLATIONLEVEL_ISOLATED         = 0x00100000  
} ISOLATIONLEVEL;   

Elements

ISOLATIONLEVEL_UNSPECIFIED
No isolation level was specified. Any isolation level is supported. A downstream component that has this isolation level always uses the same isolation level that its immediate upstream component uses. If the root object in a transaction has its isolation level configured to ISOLATIONLEVEL_UNSPECIFIED, its isolation level becomes ISOLATIONLEVEL_SERIALIZABLE.

ISOLATIONLEVEL_CHAOS
No isolation level is used. It is not safe to use this level of isolation.

ISOLATIONLEVEL_READUNCOMMITTED
A transaction can read any data, even if it is being modified by another transaction. Any type of new data can be inserted during a transaction. This is the least safe isolation level but allows the highest concurrency.

ISOLATIONLEVEL_BROWSE
Same as ISOLATIONLEVEL_READUNCOMMITTED.

ISOLATIONLEVEL_READCOMMITTED
A transaction cannot read data that is being modified by another transaction that has not committed. Any type of new data can be inserted during a transaction. This is the default isolation level in Microsoft SQL Server.

ISOLATIONLEVEL_CURSORSTABILITY
Same as ISOLATIONLEVEL_READCOMMITTED.

ISOLATIONLEVEL_REPEATABLEREAD
Data read by a current transaction cannot be changed by another transaction until the current transaction finishes. Any type of new data can be inserted during a transaction.

ISOLATIONLEVEL_SERIALIZABLE
Data read by a current transaction cannot be changed by another transaction until the current transaction finishes. No new data can be inserted that would affect the current transaction. This is the safest isolation level and is the default, but allows the lowest level of concurrency.

ISOLATIONLEVEL_ISOLATED
Same as ISOLATIONLEVEL_SERIALIZABLE.

Requirements

For an explanation of the requirement values, see Requirements (Component Services).

Platforms: Windows Server 2016, Windows 10, Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista

Header: Declared in transact.h

See Also

ITransactionDispenser::BeginTransaction
XACTTRANSINFO