Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PRO*C timeout
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
![]() |
![]() |