Solved

oracle, databases, 10, ora 12518 increasing cursor sessions

Posted on 2008-10-20
7
643 Views
Last Modified: 2013-12-18
folks

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

r
0
Comment
Question by:rutgermons
  • 3
  • 2
  • 2
7 Comments
 
LVL 47

Accepted Solution

by:
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.

0
 

Author Comment

by:rutgermons
ID: 22757644
thanks schwertner

is this a wise notion to increase the sessions

do the sessions get killed after a while?

greets

r
0
 
LVL 34

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.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

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

interested,have u got scripts for this?


gr
0
 
LVL 34

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:
SQLNET.EXPIRE_TIME=10

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!
0
 
LVL 47

Expert Comment

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

SQLNET.EXPIRE_TIME=10

should be set in SQLNET.ORA file
0
 
LVL 47

Expert Comment

by:schwertner
ID: 22966949
Thank you!
Good luck!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

759 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now