Home » Fusion Middleware & Colab Suite » Weblogic & Application Server » OCI and Oracle SESSIONS
OCI and Oracle SESSIONS [message #77213] Wed, 17 November 2004 06:07 Go to next message
slim
Messages: 6
Registered: November 2004
Junior Member
Hi,

I'm using oci whith php .

When i connect to my db (with ocilogon), i don't see nothing about it in v$session.

 

Is it normal ?

Thanks
Re: OCI and Oracle SESSIONS [message #77215 is a reply to message #77213] Wed, 17 November 2004 06:45 Go to previous messageGo to next message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
Maybe the session is closed after the OCI call?

You can keep the session alive by making it wait. Try including dbms_lock.sleep(10) to give you enough time to see the session. You could also update a row from sqlplus (don't commit) and then try to update the same from from the OCI (it will wait for the sqlplus rollback/commit).
Re: OCI and Oracle SESSIONS [message #77218 is a reply to message #77215] Thu, 18 November 2004 00:22 Go to previous messageGo to next message
slim
Messages: 6
Registered: November 2004
Junior Member
hi,
thanks for your response, when do i must use dbms_lock.sleep ?

With an alter session ?
Or directly in my script oci ?

Thanks.
Re: OCI and Oracle SESSIONS [message #77219 is a reply to message #77218] Thu, 18 November 2004 00:49 Go to previous messageGo to next message
slim
Messages: 6
Registered: November 2004
Junior Member
I have put a lock on my oci program for 30 sec, and i can see the session in v$sessions, so the sessions is closed after de query is finished.

I use the oci_pconnect function (PHP5) to connect to my database it must create a persistent connection, but it seems that the sessions is closed.

Do you know what function i must use to keep the session alive ?

Thank you.
Re: OCI and Oracle SESSIONS [message #77221 is a reply to message #77219] Thu, 18 November 2004 07:08 Go to previous messageGo to next message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
http://www.orafaq.com/faqphp.htm#POOLING
Re: OCI and Oracle SESSIONS [message #77228 is a reply to message #77221] Thu, 18 November 2004 23:34 Go to previous messageGo to next message
slim
Messages: 6
Registered: November 2004
Junior Member
Hello,
Thanks for your response.
i would like to pass a connection ressource from page to page.(to prevent reconnecting from each page).

i tryed to do this using session in php, but we can not register a variable which type is ressource connection (got from oci_connect).

Any idea ?

Thanks a lot.
Re: OCI and Oracle SESSIONS [message #77237 is a reply to message #77228] Tue, 23 November 2004 11:24 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
Oracle has quite a bit about PHP on otn.oracle.com, so that may be a good place to look.
Previous Topic: Character Encoding Problem
Next Topic: urgent help needed
Goto Forum:
  


Current Time: Mon Nov 25 16:12:01 CST 2024