Sometimes you may get ” ORA-00020: maximum number of processes exceeded ” error while login oracle database via sqlplus and Application may encounter TNS errors.
ORA-00020: maximum number of processes exceeded
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
Alter system set processes
To solve ORA-00020: maximum number of processes exceeded error, You can increase processes parameter in Oracle database as follows.
SQL> alter system set processes=2000 scope=spfile; System altered.
But This parameter is activated after Database restart.
If you cannot restart database, then 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;
maximum number of processes exceeded
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.
ORA-00020
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 as follows.
SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL>
SQL> startup ORACLE instance started. Total System Global Area 534462464 bytes Fixed Size 2230072 bytes Variable Size 339740872 bytes Database Buffers 184549376 bytes Redo Buffers 7942144 bytes Database mounted. Database opened. SQL>
I recommend you that kill inactive sessions, then change parameter , restart database in suitable time.
Do you want to learn Oracle Database for Beginners, then Click and read the following articles.
Oracle Database Tutorials for Beginners ( Junior Oracle DBA )
It’s very helpful site and you always provide the very easy solutions.
You are doing great.