--INACTIVE会话过多导致无法链接,使用如下脚本进行删除对应用户INACTIVE进程
begin
for rec in (select sid,
serial#,
module,
status
from v$session s
where s.username is not null
and s.status = 'INACTIVE'
and username = upper('&数据库用户')) loop
execute immediate 'alter system disconnect session ''' || rec.sid || ', ' || rec.serial# || '''immediate';
end loop;
end;