这个专题主要是一些日常运维中需要用到的命令,不定期更新~~
select b.spid from vsession a,vprocess b where a.PADDR=b.addr and a.SID='520';
select a.sid,a.SERIAL# from vsession a,vprocess b where a.PADDR=b.addr and b.spid='16343';
要求进程处于ACTIVE状态
select a.spid,b.sid,c.hash_value,substr(c.sql_text, 0, 40),b.logon_time,b.program from vprocess a, vsession b, V where a.addr = b.paddr and b.sql_hash_value = c.hash_value and a.spid ='';
select 'kill -9 ' || b.spid from vsession a,vprocess b where a.PADDR=b.addr and a.SID in (520)