开发者

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

开发者 https://www.devze.com 2023-01-15 00:05 出处:网络
I am trying to find out what isolatio开发者_如何学编程n level a particular session (not my own) has on an oracle server. Is there a v$.. view to get this?You can test bit 28 in the flag column in v$tr

I am trying to find out what isolatio开发者_如何学编程n level a particular session (not my own) has on an oracle server. Is there a v$.. view to get this?


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].

0

精彩评论

暂无评论...
验证码 换一张
取 消