pid_sql.sql
Download Script
break on username on sid_ser column username for a12 heading 'User Name' column sid_ser for a10 heading 'SID+SER' column sql_text for a64 heading 'SQL Statement' set pages 100 set verify off set lines 90 select b.username username, b.sid||','||b.serial# sid_ser, sql_text from v$sqltext a, v$session b, v$process c where spid = '&shadow_PID' and b.paddr = c.addr and b.sql_address=a.address and b.sql_hash_value=a.hash_value order by piece /