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 -> Re: Oracle "Sessions" left open

Re: Oracle "Sessions" left open

From: M.Rapier <M.Rapier_at_shef.ac.uk>
Date: 1996/11/08
Message-ID: <55v2la$91n@bignews.shef.ac.uk>#1/1

In article <32820FEA.1681_at_sprynet.com>, bashforth_at_sprynet.com says...

>We have an app written in VB4 connecting to Oracle 7.3 using ODBC. So
>far, so good. The problem(s)?
 

>(1) If an app terminates abnormally due to the pc being turned off, the
>ODBC connections are still left open, and we have to use the Session
>Manager to delete the sessions. To keep things nice and tidy, this has
>to be done before restarting the app, otherwise we don't know which
>sessions are valid and which aren't. This is a real pain. Is there any
>way to have Oracle manage this automatically (say, after so many hours
>of no activity on a session, kill it)?

See the Sql*Net V2.x manual on enabling dead connection detection. It works fine on our system & dead ODBC connections get cleaned up automatically - unfortunately it doesn't work if the connection is left in the middle of something like a long running query, but once the action finishes, it terminates (but most 'crashes' are actually users killing off long running queries, so ....).

If your tcp/ip stack doesn't support dead connection detection, it won't work.

>These problems seem to be fairly major, yet I find no reference to them
>anywhere, nor can I get any support/suggestions from Oracle support.
>Surely SOMEONE out there has run in to these problems?

I'm surprised that Oracle support couldn't help, but they were totally useless when we were trying to set dead connection detection up. It is a while since we did it, but from a quick look around, there is an entry in our sqlnet.ora file which says:

sqlnet.expire_time = 10

which I think does the trick.

See 'Understanding Sql*Net V2.1', Appendix A, section on Sqlnet.ora.

Cheers.
Martin. Received on Fri Nov 08 1996 - 00:00:00 CST

Original text of this message

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