To enable sql_trace FOR A SESSION, ise the following API:
“execsql,c,alter session set sql_trace =3D TRUE”
Then, run the DQL statements you wish to trace.
This will generate a *.trc file in one of two locations on the set up of the installation The <ora_sid>_<pid>_ORA.trc can be found in either:
“$ORACLE_HOME/rdbms/log” or “$ORACLE_BASE/admin/<orasid>/udump”