This is an easy way to trace all sql executing by a session from started a connection to the database. You can put more logical and filters such as by user, by time window and so on. It is especially useful when you have to trace connections that begin to execute code immediately after opening the connection.
CREATE OR REPLACE TRIGGER SYSTEM.trace_login_trigger
DBMS_SESSION.session_trace_enable (waits => TRUE,binds => FALSE);
Please, remeber it is a trigger created in system schema, be careful in production enviroments.
HTH – Antonio NAVARRO