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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: understanding orphaned processes (v$process > v$session)

Re: understanding orphaned processes (v$process > v$session)

From: Tanel Põder <tanel.poder.003_at_mail.ee>
Date: Sat, 1 May 2004 18:56:54 +0300
Message-ID: <07da01c42f94$ee23ded0$28a423d5@porgand>


> I too have seen this condition. I'm not sure I understand the
> client side mechanics, but from a server perspective, a process
> is created when an attempt to connect to the database is made,
> but a session is only created when the connection is actually
> made.
>
> sqlplus /nolog <--- creates a process
> connect scott/tiger <----- actually creates a session for the
> process

When you run sqlplus /nolog, no server processes are created, sqlplus won't make any connections in this mode.

When you issue connect command, then sqlplus automatically does both connection and session creation for you. Connection requires a new server process to be allocated (in dedicated server mode, either by spawning a new process or using a prespawned process). The session is then created through this connection using the spawned server process.

If you'd use OCI, you could separately call OCIServerAttach() function for creating the connection and OCISessionBegin() for creating a session (through the existing connection if connection pooling isn't used).

Note that in connection pooling and migratable session environments there is no one-to-one relationship between connection(server process) and session anymore.

So if the application has a bug in it which always creates a new connection for session but forgets to use OCIServerDetach() to end the connection when it's not needed anymore, you could end up with lots of open connections & server processes which aren't used by any sessions..

Tanel.



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Sat May 01 2004 - 10:54:34 CDT

Original text of this message

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