Oracle: How to find out if there is a transaction pending?

后端 未结 7 1808
太阳男子
太阳男子 2020-11-28 04:34

I\'m looking for a way to find out if there are uncommited INSERT, UPDATE or DELETE statements in the current session. One way would be to check v$lock with the current sid,

相关标签:
7条回答
  • 2020-11-28 05:33

    Matthew Watson can be modified to be used in RAC

    select t.inst_id 
           ,s.sid
          ,s.serial#
          ,s.username
          ,s.machine
          ,s.status
          ,s.lockwait
          ,t.used_ublk
          ,t.used_urec
          ,t.start_time
    from gv$transaction t
    inner join gv$session s on t.addr = s.taddr;
    
    0 讨论(0)
提交回复
热议问题