alter session set tracefile_identifier = 'myIdentifier';
The trace file identifier is added to the name of the trace files.
alter session set sql_trace = true;
select * from ...
select * from
alter session set sql_trace = false;
show parameter user_dump_dest
grep "A little bit of my statement" *.trc
tkprof oracl_ora.....trc
With a typical connection pool, a database session (the level at which we generally trace) is shared across multiple unrelated end-user sessions. Without a connection pool, the application would own a database connection, the level at which Oracle is built to “trace” at from start to finish.
With a connection pool, that one connection is shared by perhaps every end-user session in the system. We end up with a trace file that hase not only the trace information we are interested in, but the trace information from any-end user session that used the connection. The resulting trace file would be intermingled with my SQL, and with their SQL, and with everyone's SQL.
With a connection pool :