oracle, databases, 10, ora 12518 increasing cursor sessions

Posted on 2008-10-20
Last Modified: 2013-12-18

how can i check the amount of sessions alloctated to the oracle databases,the amount in use and how do i increase them(via a script)

also what is the impact of this?

all help will do

Question by:rutgermons
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
  • 2
LVL 48

Accepted Solution

schwertner earned 500 total points
ID: 22756834
select count(*) from v$sessions;

will say you the number of the current sessions.

SQL> select name,value from v$parameter where name='sessions';

NAME                                                                             VALUE
-------------------------------------------------------------------------------- -------------
sessions                                                                         170

Increase the value:

alter system set sessions=400 scope=both;

5MB RAM for every opened session - this is more important.


Author Comment

ID: 22757644
thanks schwertner

is this a wise notion to increase the sessions

do the sessions get killed after a while?


LVL 35

Expert Comment

by:Mark Geerlings
ID: 22761770
"is this a wise notion to increase the sessions?"

That depends.  If your application needs more sessions than are currently allowed, then yes.  But, pay attention to the amount of RAM in the server, because each additional session will use some additional RAM.  No, it is not 5MB per session in my experience (which is mainly with Oracle on WIndows or Linux).  In my experience, it is usually 1MB per session.

"do the sessions get killed after a while?"

That depends.  If you have resource limits activated in your database, and if you have a limt set on "connect_time", then yes, sessions will get killed automatically when they reach that limit.  Otherwise, no, they will not get closed automatically.  Resource limits are not activated by default in Oracle, so unless you have activated them manually, the sessions will not get closed automatically.  Or, your application could close sessions when they reach a certain age or limit, but we have no idea what kind of application you have or whether your application closes sessions automatically or not.  Or, you can configure SQL*Net to watch for dropped client connections and kill the sessions in the server when this happens.
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 22770524
how do i check for dropped client connections?

interested,have u got scripts for this?

LVL 35

Expert Comment

by:Mark Geerlings
ID: 22770678
"how do i check for dropped client connections?"

You can't, but SQL*Net can.  You have to add an entry like this to your listener.ora file, then restart the listener:

I think this instructs SQL*Net to check all client connections every 10 minutes, and close any that have been dropped by the client without doing a logoff.  I think this does not clear the database session immediately, but I think one of Oracle's background processes (PMON or SMON) will then notice the dropped connection and clear it.

If you want the server to close unused (or inactive) sessions faster, you will have to use resource limits and set the profile value: "idle_time" to whatever interval you feel is reasonable for your application/users.  This will cause the server to close client connections after they have been inactive for whatever time period you specify, but this may make some users unhappy!
LVL 48

Expert Comment

ID: 22776799
Yes, Mark is correct.
Only one small remark:


should be set in SQLNET.ORA file
LVL 48

Expert Comment

ID: 22966949
Thank you!
Good luck!

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
constraint check 2 56
Create Index on a Materialized View 5 47
Input a SQl, output tables amd columns used in the SQL 19 61
populate value based on what is selected in lov 2 37
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

733 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