Enabling session tracing in oracle database
1. Identify sql client session to be traced
For example you are planning to trace the session for module ABC , identify the SPID for session e.g. 13762780
alter session set nls_date_format='dd-mon-yyyy hh24:mi:ss';
set line 1000
col OSUSER for a10
col SID for 999
col USERNAME for a20
col MACHINE for a20
set pagesize 100
SELECT distinct
a.sid,
a.serial#,
b.spid, sq.sql_id,
b.pid,
a.username,
a.machine,
a.status,
a.module,
a.osuser,
a.LAST_CALL_ET/60 "Inac_Min",a.logon_time,c.event, sq.sql_text
FROM
v$session a,
v$process b,
v$session_wait c,
v$sqlarea sq
WHERE
a.username IS NOT NULL
AND
a.paddr=b.addr
and a.username='GENEVA_ADMIN' and a.sql_hash_value=sq.hash_value
and (upper(a.module) like '%ABC%')
and c.sid=a.sid;
2. Enable trace