Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Determining Transaction Isolation Level

0 views
Skip to first unread message

Aaravali Karavali

unread,
Sep 14, 2002, 6:30:30 PM9/14/02
to
Is there any way to tell, at runtime, under what transaction isolation
level a certain database operation is operating under?

Thanks!

Jusung Yang

unread,
Sep 15, 2002, 3:37:45 AM9/15/02
to
If you get a non-zero count from this SQL, you are in serializable isolation level:

select count(1) from V$TRANSACTION WHERE bitand(FLAG,268435456) <>0;


SQL> select count(1) from V$TRANSACTION WHERE bitand(FLAG,268435456) = 0;

COUNT(1)
----------
0

SQL> select count(1) from V$TRANSACTION WHERE bitand(FLAG,268435456) <>0;

COUNT(1)
----------
0

SQL> insert into tyu values('ab',1,1);

1 row created.

SQL> select count(1) from V$TRANSACTION WHERE bitand(FLAG,268435456) = 0;

COUNT(1)
----------
1

SQL> select count(1) from V$TRANSACTION WHERE bitand(FLAG,268435456) <>0;

COUNT(1)
----------
0

SQL> rollback;

Rollback complete.

SQL> set transaction isolation level serializable;

Transaction set.

SQL> select count(1) from V$TRANSACTION WHERE bitand(FLAG,268435456) = 0;

COUNT(1)
----------
0

SQL> select count(1) from V$TRANSACTION WHERE bitand(FLAG,268435456) <>0;

COUNT(1)
----------
0

SQL> insert into tyu values('ab',1,1);

1 row created.

SQL> select count(1) from V$TRANSACTION WHERE bitand(FLAG,268435456) = 0;

COUNT(1)
----------
0

SQL> select count(1) from V$TRANSACTION WHERE bitand(FLAG,268435456) <>0;

COUNT(1)
----------
1

aara...@hotmail.com (Aaravali Karavali) wrote in message news:<7161618e.0209...@posting.google.com>...

0 new messages