Wednesday, October 21, 2009

ORA-00020: maximum number of processes (%s) exceeded

User & Application users were unable to connect to database due to error ORA-00020 max number of processes. No new connection could be establised.

check for following
1. Process parameter setting in init file :
$ORACLE_HOME/dbs/initfile
processes = 200

2. Number of database connections

ps -aef grep oracle grep LOCAL grep wc -l
192

3. Number of database connections

ps -ef grep wc -l
203

Workaround 1:
kill some of the connections
Unix
kill -9

window
orakill

4. shutdown immediate / shutdown abort / startup force

Note 1:

When instance is out of processes, non-SYSDBA will get error with ORA-0020, and a SYSDBA connection will error out with "Connected to idle instance."

Note 2:
if there is no prior connection before ORA-00020 error one migh face problem in shutting down the instance.
SQL> shutdown immediate
ORA-24324: service handle not initialized
ORA-24323: value not allowed
ORA-00020: maximum number of processes (%s) exceeded
SQL> exit

Workaround 2:

1.Kill couple of old connections at OS level

2.Connect to database and determine which user is consuming more connections and kill the same.
Query
select s.osuser,p.spid,s.username,s.sid,s.serial#,to_char(s.logon_time,'Dy dd Mon HH24:MI:SS') start_time,s.status,s.machine,s.MODULEfrom V$PROCESS p,V$SESSION s where s.paddr = p.addr and s.username is not null;

3. alter system kill session 'SID, SERAL#';

Increasing the Process Parameter 1:

show parameter processes;
create pfile from spfile;
shut immediate;
startup mount;
alter system set processes=500 scope=spfile;
create pfile from spfile;
alter database open;
shutdown immediate;
startup;
show parameter processes;

Increasing the Process Parameter 2:


alter system set processes=500 scope=spfile;
shutdown immediate;
startup;


No comments:

Post a Comment