|In my opinion , if you can create log table in your database.
A easy way is insert the sql into your log table.
Create log table:
CREATE TABLE SQLLOG_DEBUG
SQL_LOG VARCHAR2(4000 BYTE)
Insert the sql into your log table.
INSERT INTO SQLLOG_DEBUG (SQL_LOG ) VALUES (ssql )
*This is just a sample, I didn't test the code.
If the sql is big , you can change SQL_LOG's datatype into clob.
You can also use DBMS_OUTPUT.PUT_LINE and redirect the output to a file.
The following page shows how to do it.
modified 17-Jul-19 1:00am.