最近刚换了工作,不过还好,还是老本行,数据库的运维工作。比较郁闷的就是摊上了升级,后台那个报错啊!先说一下ora-00020报错吧!大家都知道原因,就是进程数达到上限了。select count(*) from v$process;show parameter processes两个值已经无限接近或相同了。对停机要求不高的数据库来说非常容易,那就是修改一下参数processes的值就好了,具体流程如下:alter system set processes=2000 scope=spfile;shutdown immediatestartupshow parameter processes查看值是否改变成功就好了,那么要是不能停机怎么办啊 我就比较悲剧的遇到了这种情况,还在郁闷中,不过为了系统的正常运行,还是做了一些工作,正常工作是祖宗啊!查询一下现在的进程数:select count(*) from v$session;查看inactive的进程数量:select count(*) from v$session where status="INACTIVE";查看哪些用户下出现的INACTIVE最多select username,count(*) from v$session where status="INACTIVE" group by username;还好我的系统存在大量的INACTIVE 的连接,那就删呗,其实我也不知这样会不会对其他造成大的影响,和领导说明,不过还是决定删除。
declare cursor mycur is
select b.sid,b.serial# from v$session b where b.username= "用户名" and b.STATUS = "INACTIVE";
begin
for cur in mycur
loop
execute immediate ( "alter system kill session """||cur.sid || ","|| cur.SERIAL# ||""" ");
end loop;
end;小心哦!领导同意的情况下可以这样。
相关阅读:Oracle ORA-01555 快照过旧 说明 http://www.linuxidc.com/Linux/2012-08/66997.htmORA-01078 和 LRM-00109 报错解决方法 http://www.linuxidc.com/Linux/2012-07/66044.htmORA-01555超长的Query Duration时间 http://www.linuxidc.com/Linux/2013-12/93901.htmORA-00471 处理方法笔记 http://www.linuxidc.com/Linux/2013-09/90017.htmORA-00314,redolog 损坏,或丢失处理方法 http://www.linuxidc.com/Linux/2013-09/90646.htmORA-00257 归档日志过大导致无法存储的解决办法 http://www.linuxidc.com/Linux/2013-09/90594.htm更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12<!-- Baidu Button BEGIN -->创建Oracle 口令文件ORA-19815:警告:db_recovery_file_dest_size 已使用100%相关资讯 ORA-00020
- ORA-00020:maximum number of (07/23/2015 16:43:19)
- ORA-00020错误思考 (10/07/2014 19:15:26)
| - ORA-00020: No more process state (05/14/2015 19:02:32)
- 关于ORA-00020问题的反思 (09/23/2014 19:31:16)
|
本文评论 查看全部评论 (0)