1.性能优化
查找占用cpu过多的sql语句
select sql_text,executions from v$sql where cpu_time>200000;
查找超过一天,从某台机器上发起的的session
select * from v$session where machine='xxx' and logon_time > SYSDATE -1 ;
查找阻塞的lock
select sid,ctime from v$lock where block>0;
2.确定阻塞会话并终止会话
select sid,serial#,username from v$session where sid in (select blocking_session from v$session)
alter system kill session '144,8982' immediate;
阅读(332) | 评论(0) | 转发(0) |