We often come across a situation where a sql statement is giving issues. SQL monitor report is a very useful tool to analyze the various operation done by the sql, wait events, bind variables, and memory details.
The below statement can be used to monitor any active sql or done sql in the database
SET LONG 1000000
SET LONGCHUNKSIZE 1000000
SET LINESIZE 1000
SET PAGESIZE 0
SET TRIM ON
SET TRIMSPOOL ON
SET ECHO OFF
SET FEEDBACK OFF
SELECT DBMS_SQLTUNE.report_sql_monitor(sql_id => '&1', type => 'TEXT')
AS report FROM dual;