Unix Technical Forum

PRO*C timeout

This is a discussion on PRO*C timeout within the Oracle Miscellaneous forums, part of the Oracle Database category; --> How can i do to set a timeout on a EXECUTE SQL CONNECT statement? I've tried using unix alarms, ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database > Oracle Miscellaneous

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 12:41 PM
djake
 
Posts: n/a
Default PRO*C timeout

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 12:41 PM
Mark D Powell
 
Posts: n/a
Default Re: PRO*C timeout

On May 3, 6:30 am, djake <d...@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 --


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-08-2008, 12:41 PM
djake
 
Posts: n/a
Default Re: PRO*C timeout

>
> 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.


Even if I check the structure the problem is that something my
connection result to be ok only many seconds after the timeout has
expired.

For exmple

At sec 1 I set my timeout at 15 sec
At sec 2 I start the connection
At sec 15 I get a timeout
At sec 18 I check the PRO*C struct and the connection result KO
At sec 25 for example I get the connection KO, even if the timeout has
expired.

So what you suggest me to do?





Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-08-2008, 12:42 PM
djake
 
Posts: n/a
Default Re: PRO*C timeout

On 3 Mag, 16:30, djake <d...@excite.it> wrote:
> > 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.

>
> Even if I check the structure the problem is that something my
> connection result to be ok only many seconds after the timeout has
> expired.
>
> For exmple
>
> At sec 1 I set my timeout at 15 sec
> At sec 2 I start the connection
> At sec 15 I get a timeout
> At sec 18 I check the PRO*C struct and the connection result KO
> At sec 25 for example I get the connection KO, even if the timeout has
> expired.
>
> So what you suggest me to do?


Sorry, at second 25 I get the connection OK

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:54 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com