用戶反映不能登入数据库,使用TOAD,OEM无法登入,ORA-00020: maximum number of processes (150) exceeded。在服务器上sqlplus "/as sysdba"也不行,提示ORA-01012 :Not logged in。让用户关掉一部分已连接上的session。登入后发现进程数超过限制(150),有大量的Inactive进程,其中有近80个都是一个叫asus_ap的帐号的。而平常此系统上进程数一般为60个左右。询问开发人员最近有没有更新程式,是不是有打开了连接没有关闭的情况,是不是有事务没有commit或者rollback。经查找,后初步确认为开发人员debug程式时,有很多事务没有跑完,就异常结束而引起的资源长期得不到释放。
使用alter system kill session 'sid,serial#';结束那些进程。
再对这个用户限制空闲时间。
1. Enable the feature
SQL>alter system set resource_limit = true scope=both;
2. Create the profile for monitoring idle time:
SQL>create profile asus limit idle_time 20;
3. Attach the profile to desired user:
SQL> alter user asus_ap profile asus;
问题未再出现。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/18953778/viewspace-561420/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/18953778/viewspace-561420/