标签:
--正在执行的sql
select b.sid,b.username,b.serial#,spid,paddr,sql_text,b.machine from v$process a,v$session b,v$sqlarea c
where a.addr=b.paddr and b.sql_hash_value=c.hash_value;
--被锁对象
select l.session_id sid,s.serial#,l.locked_mode 锁模式,l.oracle_username 登入用户,l.os_user_name 用户名,s.machine 机器名,
s.terminal 终端用户名,o.object_name 对象,s.logon_time 登录时间,(sysdate-s.logon_time)*24*60*60||‘s‘ 执行时间
from v$locked_object l,all_objects o,v$session s
where l.object_id=o.object_id and l.session_id=s.sid
order by sid,s.serial#;
--杀死进程 alter system kill session ‘sid,serial#‘;
alter system kill session ‘170,12718‘;
--清空缓存
alter system flush buffer_cache;--10g以上
alter session set events ‘immediate trace name flush_cache‘; --9i
--清空共享池
ALTER SYSTEM FLUSH SHARED_POOL;
标签:
原文地址:http://www.cnblogs.com/hupolinglong/p/5644286.html