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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Re-establishing lost connection from proC

Re: Re-establishing lost connection from proC

From: Keith Jamieson <jamiesonk_at_phoenix.ie>
Date: Thu, 2 Sep 1999 14:48:47 +0100
Message-ID: <7qlv9v$n9h$1@ezekiel.eunet.ie>


There is a specific error message returned when the connection can't be established.

Use the error number and error message statements after your connect statement, the same way you would for all sql statements.

Then when this message is encountered, all you have too do is say exec sql connect etc;

I would also make sure that your program went to sleep for at the very least every 5 minutes.
also you need to limit the number of iterations. Ie if the program has gone through 12 iterations (1 every 5 minutes), it hasn't been able to connect for an hour. That would suggest that there might be something seriously wrong.

Declan Higgins wrote in message <7qljfl$7p8$1_at_nnrp1.deja.com>...
>Rather than re-invent the wheel I thought I'd ask the combined
>wisdom of comp.databases.oracle.misc...
>
>I need to have a pro*c program which detects loss
>of connection to the Oracle database and cycles in a loop
>retrying until the database is available to reconnect to.
>
>I'm assuming (naively) that this has been done before.
>
>Anyone care to donate any code snippets ?
>
>Thanks in advance
>
>Declan Higgins
>
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
Received on Thu Sep 02 1999 - 08:48:47 CDT

Original text of this message

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