Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Proesses Limit andOpen Cursors Limit in Oracle 10g in Windows 32 Bit

Posted on 2007-11-27
5
Medium Priority
?
1,171 Views
Last Modified: 2013-12-19
We have developed business application software using Oracle 10g as the back end and VB as the front end.

When Oracle 10g is installed on Windows 2003 server, it has by default 300 Open Cursors and 150 Processes. There are approx 50-100 simultaneous users working on our software at the Client end.

Problem
Software works fully OK for days and months togather. Rarely we get that limit of Processess is exhausted and then it does not allow users to connect where as the number of users at that time may be even smaller than previously. In that case we need to shutdown the Oracle Server and Startup again. The problem gets solved.

Solution is required to permanenlty fix the the problem.  Shutting down the Oracle Database and running again is not the soltution.


Regards

Suresh Bansal
Noida -UP -India





0
Comment
Question by:suresh_bansal
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 9

Expert Comment

by:joebednarz
ID: 20358261
Is there a firewall between your client (VB) applications and the database?  We have seen a similar problem when the db and the app are separated by firewall.

With our VB app, cursors are opened and closed whenever you move to other pages, but the database sometimes gets disconnected and thinks it still needs to keep the connection open.  I have a script that runs periodically that kills sessions that has been idle for over 60 minutes.... in a typical web application system with database back end, you shouldn't have any connections active for more than a minute or so...

My "idle kill" script just runs from time to time and it keeps the resources freed... not an elegant solution, but it seems to work for us.
0
 
LVL 9

Expert Comment

by:joebednarz
ID: 20360095
Here is my script:
set heading off;
set echo off;
set pages 1000;
set lines 200;
set feedback off;
 
connect sys@test as sysdba
 
prompt Finding dead sessions (DEV, TEST, and QA).
 
spool kill.sql
 
select 'alter system kill session ''' || sid || ',' || serial# || ''' immediate;'
from v$session
where seconds_in_wait > 10800 and username in ('DEV', 'TEST', 'QA' );
 
spool off;
 
prompt Killing sessions (DEV, TEST, and QA) that have been idle for more than 3 hours.
 
@@kill
 
prompt Done.

Open in new window

0
 

Author Comment

by:suresh_bansal
ID: 20364223
The solution seems to work. But casn you advise me on following

a) We run Oracle 10g in the Windows 2003 Server

b) By default processess at the time of install is 150 and open cursors = 300 by default.  Whether we should increase this default and what needs to be the criteria /basis for that.

c) What and how these cursors /processes get used.

d) How to run the script in windows scheduler automatically as this may not be advisable to run it manually at  the server periodically

suresh bansal






0
 
LVL 9

Accepted Solution

by:
joebednarz earned 1000 total points
ID: 20367257
suresh,

a) 10g on W2K3 should be fine
b) if your system seems to be running ok with the current settings, keep them... you might later try running some tools to gather performance information, etc, to tune some parameters.
c) assume you mean, why are they just staying out there... I am not 100% sure, but from what I've seen here, the problem is either... ODP.NET does not dispose of the connections correctly, or the firewall incorrectly is keeping open, or closing prematurely, connections.
d) put script I sent into a text file called kill_script.sql.  you will have to add one line at end... "QUIT"  create a file called "kill_script.cmd" and inside put:

SQLPLUS -s @kill_script.sql

then add "scheduled task" and point to the "kill_script.cmd" file... schedule appropriate time, etc.
0
 

Author Closing Comment

by:suresh_bansal
ID: 31618589
Thanks for the reply & regards

Suresh Bansal
0

Featured Post

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question