wood burning stoves*
The moose likes JDBC and the fly likes ora-00020 too many processes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "ora-00020 too many processes" Watch "ora-00020 too many processes" New topic
Author

ora-00020 too many processes

Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6661
    
    5

We have a batch process that executes every so seconds and this morning i found that the batch was throwing ora-00020 exception every time it tries to execute a query. I have a doubt on which method to adopt to make sure such errors dont happen again. Here are my approches

1. Make the batch process obtain a connection every time and then close it when it is done.

2. Make the batch process obtain a single connection and execute my queries based on this connection. I will not close this connection for every loop. This connection would be obtained only once and the infinite loop uses it.


I think i would be better off with approach number 1. That way if the database is down at any point of time the batch need not be started again. Also... if say i obtain a connection everytime like

conn = something.getConnection();

and i dont close this connection i am bound to get ORA-00020 arent I ?

The solution is not to increase the number of processes because we already have a number that is phenominally high than needed so i am pretty sure the program is screwed up some where.

Please let me know what you think


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6661
    
    5

Ah ! solved this one yesterday. I re establish connection for every loop and that releases all my resources. The batch runs well now.
 
Don't get me started about those stupid light bulbs.
 
subject: ora-00020 too many processes
 
Similar Threads
JDBC Max number of cursors exceeded issue
Connection not getting closed in websphere
ORA-00020: maximum number of processes (59) exceeded
MAximum cursor limit
what does this Oracle error msg mean ?