ORA-00020: maximum number of processes exceeded Oracle TNS Errors

Hi,

Sometimes you may get ” ORA-00020: maximum number of processes exceeded ” error while login oracle database via sqlplus and Application may encounter TNS errors.

 

If you got ORA-00020 error like following, it means process parameter has exceeded its max value.

ORA-00020: maximum number of processes (1500) exceeded

 

 

You need to increase processes parameter in Oracle database. But This parameter is activated after Database restart.

So You may solve this problem to kill inactive sessions like following.

 

select 'kill -9 ' || p.SPID, s.USERNAME, 'alter system kill session '''||sid||',' || s.serial# || ''';',s.STATUS
from v$session s, v$process p
where s.PADDR = p.ADDR (+)
and s.STATUS='INACTIVE' and s.USERNAME = 'DWH'
order by 1;

 

You can modify username parameter according to your Database user, then run Result script like following.

Execute following script in the Database.

alter system kill session '957,37560';
alter system kill session '96,10173';
alter system kill session '97,22149';
alter system kill session '98,18153';
alter system kill session '99,44333';

 

Or you can execute following script on Linux server.

kill -9 41158
kill -9 41563
kill -9 41895
kill -9 42984
kill -9 44751

 

But If you cannot login database and specify inactive sessions, then you can change processes parameter like following then restart database.

You can think that how can you alter process parameter without login database, i just kill some inactive sessions then I login database.

SQL> show parameter processes

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 1
db_writer_processes integer 1
gcs_server_processes integer 0
global_txn_processes integer 1
job_queue_processes integer 1000
log_archive_max_processes integer 4
processes integer 1500
SQL>
SQL>
SQL> alter system set processes=2000 scope=spfile;

System altered.

SQL>

 

Restart database after this operation.

I recommend you that kill inactive sessions, then change parameter , restart database in suitable time.

 

Mehmet Salih Deveci

I am Founder of IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience. I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource. I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks. I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients. If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress mehmetsalih.deveci@outlook.com. -                                                                                                                                                                                                                                                 - Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  mehmetsalih.deveci@outlook.com a mail atabilirsiniz.