How to get DML SQL of uncommited statements in Oracle 19c?
I'd like to know if there is a way to get the DML (
delete) SQL of uncommitted statements in Oracle 19c in my own session?
For example, if I have typed some statements and I haven't committed them and I've closed my worksheet, can I get them back? Another example of this. Say I've done some deletes using the SQL Developer GUI, selecting the rows I want to delete and then clicking the delete icon (without haven't committed nor made a
Is there a way I can get this as SQL statements? I thought I could get them in the Log but no... Surely there has to be a way but I haven't found it. Can you help me out?
Oracle caches SQL statements in the shared pool and can be queried in
v$sql. However, Oracle may remove a SQL statement if it wants the memory. Oracle also runs many SQL statement internally. Therefore, finding a SQL from
v$sqlis like finding a needle in a haystack, though the haystack is not too big.
In SQL Developer, there should be a SQL History, which keeps quite a lot of SQL ran by the user.