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 -> Non-blocking database calls with OCI

Non-blocking database calls with OCI

From: Rick Robinson <rick_at_oyarsa.com>
Date: Sat, 18 Aug 2001 15:34:13 GMT
Message-ID: <VVvf7.25460$Iq4.10483739@typhoon.columbus.rr.com>


In some releases of Oracle prior to 8, a function ognfd() was available (Oracle Get Native File Descriptor) on certain platforms for use in a Unix select() statement. This supported the ability to not have to write a tight while loop with your own timeout condition when performing non-blocking I/O.

I'm now using Oracle 8i and was trying to do this again, but it doesn't appear to work (?).

I did the following -
After initializing and setting up a valid service context, I called the function OCISvcCtxToLda() to get the old V7 Lda, and then used ognfd() with the Lda just retrieved. These functions succeeded, but when I tried to use the file descriptor in the select() statement, it always timed out (even when it should've been okay).
So, quick summary:
- OCISvcCtxToLda()

Questions:
1) Can ognfd() still be used in Oracle 8i? What about Oracle 9i? 2) Does the use of OCI* functions after the OCISvcCtxToLda call somehow impact this? Once this is executed and the mode is V7, should I be using the older OCI function calls instead?
3) Is there another, more efficient, way to do this non-blocking I/O? Or do I need to resort to the while OCI_STILL_EXECUTING loop with my own timer?

Thanks in advance,
R Received on Sat Aug 18 2001 - 10:34:13 CDT

Original text of this message

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