Yes, you can do it for one session like this:
dbms_system.set_sql_trace_in_session(SID,SerialNb,true);
where you may find SID and SerialNB in v$session:
SELECT SID, SERIAL# SerialNb FROM v$session;
And you also can do it for all sessions like this (under SYS):
alter system set events '10046 trace name context forever, level 4'
and then you can disable the traces with the folloowing command:
alter system set events '10046 trace name context off'
You will find the trace files in the $ORACLE_BASE/admin/$ORACLE_SID/udump directory (this settings could be changed in the init.ora file).
Greetings,
Alain