select sql_text from v$session a,v$sqltext_with_newlines b
where DECODE(a.sql_hash_value, 0, prev_hash_value, sql_hash_value)=b.hash_value
and a.sid=&sid order by piece;
col start_time for a20
select sid, a.username, b.start_time, b.start_scnb, b.xidusn,
b.used_urec, b.used_ublk, a.status ses_stat, a.sql_id
from v$session a, v$transaction b
where a.saddr = b.ses_addr and a.sid=&sid;
col spid for a24
select spid from v$process where addr =(select paddr from v$session where sid=&sid);
--可能查不到,就用下面的
select spid, program from v$process
where program!= 'PSEUDO'
and addr not in (select paddr from v$session)
and addr not in (select paddr from v$bgprocess)
and addr not in (select paddr from v$shared_server);
select spid,addr from v$process where addr=(select creator_addr from v$session where sid=&sid);
kill -9 SPID
阅读(989) | 评论(0) | 转发(0) |