Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQL text which caused a transaction

2809187Aug 4 2016 — edited Aug 5 2016

Hello,

Oracle Linux 11.2.0.4

How to get SQL text which caused a transaction?

Especially interested in situation where user did some DMLs and then some queries. No commit or rollback was executed. So, user's session remains inactive but with active transaction in v$transaction. By joining v$session and v$transactions I can see that this session has an active transaction. But how to find which DML initiated this transaction?

Solution with "PREV_SQL_ID" doesnt work as in this case it shows last statement (which is not DML)

Regards, Randjar

This post has been answered by toonie on Aug 5 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 2 2016
Added on Aug 4 2016
15 comments
2,366 views