Database Reference
In-Depth Information
Table 32-5. Write/write conflicts in in-memory OLTP
Session 1
Session 2
Results
begin tran
select ID, Col
from dbo.HKData
with (snapshot)
begin tran
update dbo.HKData
with (snapshot)
set Col = -3
where ID = 2
commit
update dbo.HKData
with (snapshot)
set Col = -2
where ID = 2
Msg 41302, Level 16, State 110, Line 1
The current transaction attempted to update a record
that has been updated since this transaction started. The
transaction was aborted.
Msg 3998, Level 16, State 1, Line 1
Uncommittable transaction is detected at the end of the
batch. The transaction is rolled back.
The statement has been terminated.
begin tran
select ID, Col
from dbo.HKData
with (snapshot)
begin tran
update dbo.HKData
with (snapshot)
set Col = -3
where ID = 2
update dbo.HKData
with (snapshot)
set Col = -2
where ID = 2
Msg 41302, Level 16, State 110, Line 1
The current transaction attempted to update a record
that has been updated since this transaction started. The
transaction was aborted.
Msg 3998, Level 16, State 1, Line 1
Uncommittable transaction is detected at the end of the
batch. The transaction is rolled back.
The statement has been terminated.
commit
Successful commit of Session 2 transaction
Cross-Container Transactions
Any access to memory-optimized tables from interpreted T-SQL is done through the Query Interop engine and leads
to cross-container transactions . You can use different transaction isolation levels for on-disk and memory-optimized
tables. However, not all combinations are supported. Table 32-6 illustrates possible combinations for transaction
isolation levels in cross-container transactions.
 
 
Search WWH ::




Custom Search