How can you see what transaction isolation level an arbitrary oracle session is using

kon5ad picture kon5ad · Sep 8, 2010 · Viewed 10.2k times · Source

I am trying to find out what isolation level a particular session (not my own) has on an oracle server. Is there a v$.. view to get this?

Answer

Danilo Piazzalunga picture Danilo Piazzalunga · Jan 15, 2011

You can test bit 28 in the flag column in v$transaction[1].

SELECT s.sid, s.serial#,
  CASE BITAND(t.flag, POWER(2, 28))
    WHEN 0 THEN 'READ COMMITTED'
    ELSE 'SERIALIZABLE'
  END AS isolation_level
FROM v$transaction t, v$session s
WHERE t.addr = s.taddr
  AND s.sid = :sid
  AND s.serial# = :serial;

Just remember that v$transaction only lists active transactions[2]; for example, you need to issue an insert/update/delete/merge, or use "for update"[3].