加入收藏
最新动态
最新动态
ORACLE

Oracle ORA-00020 解决方案

来源:未知 作者:admin 人气: 时间:2014-02-07

oracle的参数需要调整: 
以sys登录oracle控制台,然后: 
 

Java代码  收藏代码
  1. alter system set processes=500 scope=spfile;  
  2. alter system set sessions=500 scope=spfile;(这个可以不要)  


由于processes参数是静态参数,调整时需要使用“scope=spfile”选项进行调整。 
然后重启oracle服务: 
 

Java代码  收藏代码
  1. shutdown immediate;  


 

Java代码  收藏代码
  1. startup;  



确认调整结果: 
 

Java代码  收藏代码
  1. show parameter processes;  


查看当前数据库进程数: 
 

Java代码  收藏代码
  1. select count(*) from v$process;  



【附注】 
5.处理ORA-00020错误 
既然是由于进程数过多到时的报错,因此我们最直接的处理方法便是手工杀掉无用的用户连接。 
1)查看数据库后台进程信息 
ora10g@secdb /home/oracle$ ps -ef | grep ora11g 
oracle   22882     1  0 21:24 ?        00:00:00 ora_pmon_ora11g 
oracle   22884     1  0 21:24 ?        00:00:00 ora_vktm_ora11g 
oracle   22888     1  0 21:24 ?        00:00:00 ora_gen0_ora11g 
oracle   22890     1  0 21:24 ?        00:00:00 ora_diag_ora11g 
oracle   22892     1  0 21:24 ?        00:00:00 ora_dbrm_ora11g 
oracle   22894     1  0 21:24 ?        00:00:00 ora_psp0_ora11g 
oracle   22896     1  0 21:24 ?        00:00:00 ora_dia0_ora11g 
oracle   22898     1  0 21:24 ?        00:00:00 ora_mman_ora11g 
oracle   22900     1  0 21:24 ?        00:00:00 ora_dbw0_ora11g 
oracle   22902     1  0 21:24 ?        00:00:00 ora_lgwr_ora11g 
oracle   22904     1  0 21:24 ?        00:00:00 ora_ckpt_ora11g 
oracle   22906     1  0 21:24 ?        00:00:00 ora_smon_ora11g 
oracle   22908     1  0 21:24 ?        00:00:00 ora_reco_ora11g 
oracle   22910     1  0 21:24 ?        00:00:00 ora_mmon_ora11g 
oracle   22912     1  0 21:24 ?        00:00:00 ora_mmnl_ora11g 
oracle   22914     1  0 21:24 ?        00:00:00 ora_d000_ora11g 
oracle   22916     1  0 21:24 ?        00:00:00 ora_s000_ora11g 
oracle   22945 22103  0 21:24 ?        00:00:00 oracleora11g (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) 
oracle   22947     1  0 21:24 ?        00:00:00 ora_qmnc_ora11g 
oracle   22961     1  0 21:24 ?        00:00:00 ora_cjq0_ora11g 
oracle   22972     1  0 21:25 ?        00:00:00 ora_q000_ora11g 
oracle   22974     1  0 21:25 ?        00:00:00 ora_q001_ora11g 
oracle   22993 22992  0 21:25 ?        00:00:00 oracleora11g (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) 
oracle   23106 23066  0 21:27 pts/6    00:00:00 grep --color ora11g 

这里显示出两类进程,一类是Oracle数据库的后台进程,另外一类是用户连接进程。 
我们可以考虑讲用户连接进程杀掉,注意Oracle数据库后台进程不可轻易手工杀掉。 

2)杀掉用户连接进程22945 
ora10g@secdb /home/oracle$ kill -9 22945 

3)尝试重新连接数据库 
ora11g@secdb /home/oracle$ sqlplus / as sysdba 

SQL*Plus: Release 11.2.0.1.0 Production on Mon Dec 12 21:28:56 2011 

Copyright (c) 1982, 2009, Oracle.  All rights reserved. 


Connected to: 
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production 
With the Partitioning, OLAP, Data Mining and Real Application Testing options 

sys@ora11g> 

连接成功。到此ORA-00020错误便处理完毕。 

6.小结 
  本文给出了ORA-00020错误的模拟以及简单的处理方法。对于生产环境最有效的避免发生ORA-00020错误的方法便是,上线前充分评估系统需要的最大进程数,一次性设置充分。这样便可以从根本上防止ORA-00020错误的发生。

  • 用友
  • IBM
  • oracle
  • 联想
  • 华为
  • 思科
  • 公司地址:广州市天河区燕岭路95号四楼404室A20 邮编:510000
    电话:020-31600147 传真:020-31600147
      Copyright © 2015-2024 yunyuns.cn 云云(广州)科技有限公司 版权所有 ICP备13000495号-10