![]() ![]() Mt transaction bao gm cc hot ng khc nhau phi tha mn iu kin hoc l tt c thnh cng hoc l. AllowSnapshotIsolation is transaction-level isolation, everything between the Begin Tran and Commit. L mt trong 4 tnh cht quan trng ca transaction bao gm: Tnh nguyn t ( Atomicity ). The following table provides a summary of metadata access under various isolation levels. ReadCommittedSnapshot is statement-level isolation, in other words only applies to the statement currently running. Dynamic management views and functions For more information about isolation levels, see SET TRANSACTION ISOLATION LEVEL (Transact-SQL). However, this is at the expense of the correctness of the results. Although Kim mentions an answer to the original question, there is still a need to modify code if using both. This is documented in SET TRANSACTION ISOLATION LEVEL (Transact-SQL):Īll read operations performed within the transaction operate under the rules for the specified isolation level unless a table hint in the FROM clause of a statement specifies different locking or versioning behavior for a table.Īs far as performance, using NOLOCK will ignore locks taken by other queries, and take / release locks more quickly, so you will likely experience less blocking. Then the SELECT query will use the READ UNCOMMITED isolation level* - in other words, the NOLOCK will override the SET statement. If you have stored procedure that starts with: SET TRANSACTION ISOLATION LEVEL READ COMMITTED Īnd then you have a SELECT query like this: SELECT * FROM dbo.MyTable mt WITH (NOLOCK)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |