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: PRO*C timeout

Re: PRO*C timeout

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 3 May 2007 06:08:49 -0700
Message-ID: <1178197729.041646.101130@l77g2000hsb.googlegroups.com>


On May 3, 6:30 am, djake <d..._at_excite.it> wrote:
> How can i do to set a timeout on a EXECUTE SQL CONNECT statement?
> I've tried using unix alarms, but it can happen that i receive a
> connection also after a timeout has expired, so i can't really know if
> the connection has been done or not.
> Do you have suggestions?
> Thanks

All imbedded EXECUTE SQL statements set a return code so if the call completes your program can check the sqlcs.h or equilivent control structure to determine if the prior call was successful or unsuccessful.

Externally you can query Oracle to see if the Unix pid has an associated Oracle session.

Internally you should be able to issue a OS interrupt timer call before you issue the connect that will signal your program if your program does not cancel the timer call before it expires.

HTH -- Mark D Powell -- Received on Thu May 03 2007 - 08:08:49 CDT

Original text of this message

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