Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Sessions, threads, and open_cursors

Sessions, threads, and open_cursors

From: James Cooper <pixel_at_organic.com>
Date: 1997/07/16
Message-ID: <5qj61e$6ks$1@re.hotwired.com>#1/1

Hi,

I've got an Oracle 7.3.2 database on Solaris, and I'm a little confused about the difference between connections, sessions, and open_cursors.

In the office there are a variety of apps that are connecting to Oracle. A few of them are multithreaded, and will send concurrent SQL queries to Oracle over a single connection handle.

"Oracle Unleashed", reports that "A session, simply stated, is a single connection to a database instance based up on a username and optionally, a password".

When I look at v$session, it appears that each concurrent query is allocated a separate session, even thought they are going over a single connection. If this is the case, how is Oracle licensing based? If I have an 8 user license for Oracle, does that mean 8 connections, each with x number of sessions per connection?

Also, some of the sessions may be stale. If a client locks up and reboots, will Oracle detect that the client has gone away and remove the session from v$session? If there is a timeout interval, how long is it?

I'm asking, because I'm occassionally getting errors in Oracle that I've exceeded my maximum number of sessions. I really don't know how many sessions I can have, since I don't really know what constitutes a session. Is there a parameter in init.ora that specifies that number of sessions allowed per connection?

...

On a related note, I'm getting errors about exceeding the maximum number of open_cursors. A few months back I perused DejaNews, and found some pointers on how to expand the number of open_cursors. I added:

open_cursors = 255
close_cached_open_cursors = TRUE

to my init.ora and restarted the instance. But last night I found that 266 cursors were open at once. I have combed over my code looking for places where I forget to close a cursor and can't find any, so I'm wondering if there are any options I'm missing.

Thanks

                              James Paul Cooper
                      Organic Online - pixel_at_organic.com
                          ......Know Future......
Received on Wed Jul 16 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US