如何判断在 Oracle 事务中是否有未提交的工作?

2022-01-06 00:00:00 sql transactions oracle

有没有办法判断我在事务中是否有未提交的工作(即 DML)?也许我可以查询数据字典视图?

Is there a way to tell if I have uncommitted work (ie DML) in a transaction? Maybe a data-dictionary view I can query?

欢迎使用一种在运行开放事务的会话内部和外部找出这一点的方法.

A method to find this out both from within and outside of the session running the open transaction would be welcome.

谢谢

推荐答案

SELECT  *
FROM    v$session v
WHERE   v.AUDSID = userenv('sessionid')
    AND v.TADDR IS NOT NULL

相关文章