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 -> Re: Pro*C blocking call

Re: Pro*C blocking call

From: <yong321_at_yahoo.com>
Date: Tue, 27 Mar 2001 22:16:06 +0000
Message-ID: <3AC11126.28CE6B66@interbulletin.com>

Note that Windows does not have the concept of signals. The only thing you can do in Windows is kill the session (alter system kill session in SQLPlus or orakill in OS).

Yong Huang

"Jeroen" <jeroenthuis_at_gmx.net> wrote in article <99qs1h$shm$1_at_buty.wanadoo.nl> :
>Forgot to mention that the program must run on WinNT and Unix...
>
>"Kevin Brand" <kevin.brandx_at_tel.gte.com> wrote in message
>news:99qo1q$av7$1_at_news.gte.com...
>>
>> Assuming your platform is UNIX/ ( POSIX?):
>>
>> see man pages for system calls
>> alarm()
>> signal()
>> setjmp()
>> longjmp()
>>
>> Essentially you set a 30 second alarm before your SQL statement. If the
>> alarm goes off before the statement is finished, your process will get the
>> SIGALRM signal, which you must handle via signal() correctly.
>>
>> Now, this stuff works great for a blocking read against, say, a
 device/port,
>> but I'm not exactly sure how it will work ( if at all ) with the PRO/C
 API.
>> I'm sure it will indeed allow a different part of your code to take
 control,
>> but doubt it will actually cancel the operation in the backend database.
>>
>> Good luck,
>>
>> -Kevin
>>
>> "Jeroen" <jeroenthuis_at_gmx.net> wrote in message
>> news:99qeb9$2thf$1_at_buty.wanadoo.nl...
>> > Question,
>> >
>> > I want to develop a Pro*c program, in which i execute a SQL statement.
 If
>> > this statements executes more than 30 seconds, i want it to be
 cancelled.
 It
>> > MUST be singlethreaded code. Is their anyway i can do this using Pro*c,
 not
>> > using a stored procedure ?
>> >
>> >
>> > Jeroen
>> >
>> >
>>
>>
>
>



Submitted via WebNewsReader of http://www.interbulletin.com Received on Tue Mar 27 2001 - 16:16:06 CST

Original text of this message

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