SCRIPT: what is the session doing

select
–‘alter system kill session ”’|| s.SID||’,’ || s.serial# ||”” ,
–‘kill -9 ‘ || p.spid,
p.SPID UnixProcess ,s.SID,s.serial#,
s.USERNAME,s.COMMAND,s.MACHINE,
s.SQL_ADDRESS,s.SQL_HASH_VALUE
,s.program, cpu_time,fetches,
disk_reads,buffer_gets,rows_processed,
executions,child_latch,event,sql_text,COMMAND_TYPE,
sbc.name,to_char(sbc.last_captured,’yyyy-mm-dd hh24:mi:ss’),
sbc.value_string
from v$session s
join v$process p on p.ADDR = s.PADDR — and p.SID in (27817)
left outer join v$sqlarea sa on sa.ADDRESS = s.SQL_ADDRESS
left outer join V$SQL_BIND_CAPTURE sbc on sbc.ADDRESS = s.SQL_ADDRESS
where 1=1
–and s.program like ‘imp%’
–and s.username =’SIEBEL’
–AND p.SPID in (15179,8304)
–and s.SID in (1019)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: