Trace

-- trace on
alter session set sql_trace=true;

sys.dbms_system.set_sql_trace_in_session(SID, serial#, true);

sys.dbms_system.set_ev(SID, serial#, 10046, 12, '');

DBMS_MONITOR.session_trace_enable (
    session_id => 15,
    serial_num => 1234);

-- trace off
alter session set sql_trace=false;

exec dbms_system.set_ev(18,1217,10046,0,'');

DBMS_MONITOR.session_trace_disable (
    session_id => 15,
    serial_num => 1234);