Skip to end of metadata
Go to start of metadata

The default transaction isolation level for ASE is level 1, also known as READ COMMITTED.  Under this isolation level, uncommitted inserts on tables using the datarows lock scheme do not block other sessions that are reading the table.  Similar updates to tables using a page-level lock scheme do block.   Traceflag 693 causes uncommitted inserts on datarow tables to block as well.

Default Behavior:

Session 1Session 2

create table t1 (x int) lock datarows
insert t1 values (1)
go
begin tran
insert t1 values (2)
go

 
 

select * from t1
go
 x 
 -----------
           1
(1 row affected)

 

commit tran
go

 
 

select * from t1
go
 x
 -----------
           1
           2
(2 rows affected)


Example using switch 693

create table t1 (x int) lock datarows
insert t1 values (1)
go
begin tran
insert t1 values (2)
go

 
 

set switch on 693 with override
go
select * from t1
go
-- blocked --

commit tran
go

 
 

 x
-----------
1
2
(2 rows affected)

 

 

  • No labels