KIll session 脚本
时间:2010-10-25 来源:zhangyjd
kill超过1天未active的session
SELECT 'ALTER SYSTEM KILL SESSION ''' || s.sid || ',' || s.serial# || ''';',
'kill -9 ' || p.SPID
FROM v$session s, v$process p
WHERE s.username IS NOT NULL
and s.PADDR = p.ADDR
AND s.status != 'ACTIVE'
and s.last_call_et > '86400'
ORDER BY s.last_call_et;
'kill -9 ' || p.SPID
FROM v$session s, v$process p
WHERE s.username IS NOT NULL
and s.PADDR = p.ADDR
AND s.status != 'ACTIVE'
and s.last_call_et > '86400'
ORDER BY s.last_call_et;
相关阅读 更多 +