How to cancel a query in Oracle?

How to cancel a query in Oracle?

Post by Jinqlih San » Thu, 04 Jun 1998 04:00:00



The code in my application is like:

++++++++++++++
EXEC SQL PREPARE ... (prepare sql statement)
EXEC SQL DECLARE CURSOR ... (declare a cursor)
EXEC SQL OPEN ... (open a cursor)
EXEC SQL DECLARE SELECT LIST FOR sqlCommand INTO SelectDescriptor
                        (describe the returned results)
EXEC SQL FETCH ...USING DESCRIPTOR ... (retrieve the next row)
EXEC SQL CLOSE ... (close the cursor)
++++++++++++++

** I wish I can cancel the select statement when Oracle Server has
been executing (the cursor is open already)

** In another words, I wish Oracle client can pass the sql statement
to Oracle server, and Oracle server would (could be??) simply
execute it but return the control to the oracle client so the oracle
client appliation can still do something else. The client
can ask Oracle server whether the data is available to fetch or not.
If Oracle server would return "yes, data is ready." then client
will start fetching the data.

Does it make sense?

I know SQL Server can do that, I am wondering if Oracle can do that
or not. It would be helpful if it's a large select, otherwise
the client can not do anything except waiting.

Thanks.

 
 
 

How to cancel a query in Oracle?

Post by TurkBe » Thu, 04 Jun 1998 04:00:00



>The code in my application is like:

>++++++++++++++
>EXEC SQL PREPARE ... (prepare sql statement)
>EXEC SQL DECLARE CURSOR ... (declare a cursor)
>EXEC SQL OPEN ... (open a cursor)
>EXEC SQL DECLARE SELECT LIST FOR sqlCommand INTO SelectDescriptor
>                        (describe the returned results)
>EXEC SQL FETCH ...USING DESCRIPTOR ... (retrieve the next row)
>EXEC SQL CLOSE ... (close the cursor)
>++++++++++++++

>** I wish I can cancel the select statement when Oracle Server has
>been executing (the cursor is open already)

>** In another words, I wish Oracle client can pass the sql statement
>to Oracle server, and Oracle server would (could be??) simply
>execute it but return the control to the oracle client so the oracle
>client appliation can still do something else. The client
>can ask Oracle server whether the data is available to fetch or not.
>If Oracle server would return "yes, data is ready." then client
>will start fetching the data.

>Does it make sense?

>I know SQL Server can do that, I am wondering if Oracle can do that
>or not. It would be helpful if it's a large select, otherwise
>the client can not do anything except waiting.

>Thanks.

I believe that SqlNet is what is holding the client...I am not sure is
SqlNet can be run in a 'non-blocking' mode so what you want may not be
possible...Perhaps others have found a way...

Good Luck,
John Greco

 
 
 

1. How to cancel a query in Oracle?

The code in my application is like:

++++++++++++++
EXEC SQL PREPARE ... (prepare sql statement)
EXEC SQL DECLARE CURSOR ... (declare a cursor)
EXEC SQL OPEN ... (open a cursor)
EXEC SQL DECLARE SELECT LIST FOR sqlCommand INTO SelectDescriptor
                        (describe the returned results)
EXEC SQL FETCH ...USING DESCRIPTOR ... (retrieve the next row)
EXEC SQL CLOSE ... (close the cursor)
++++++++++++++

** I wish I can cancel the select statement when Oracle Server has
been executing (the cursor is open already)

** In another words, I wish Oracle client can pass the sql statement
to Oracle server, and Oracle server would (could be??) simply
execute it but return the control to the oracle client so the oracle
client appliation can still do something else. The client
can ask Oracle server whether the data is available to fetch or not.
If Oracle server would return "yes, data is ready." then client
will start fetching the data.

Does it make sense?

I know SQL Server can do that, I am wondering if Oracle can do that
or not. It would be helpful if it's a large select, otherwise
the client can not do anything except waiting.

Thanks.

2. FMP 4.1 and Developer

3. Analysis Service cancels queries on Oracle database

4. Trigger to generate Child IDs?

5. Rdo and Oracle Cancel Query Problem

6. Getting Error 1108

7. Cancel queries to Oracle

8. Move SQL Server to another machine

9. Problem with canceling an Rdo/Oracle query.

10. cancel query???

11. How To Cancel Long Running Query ?

12. Cancel Query, RollBack problem?

13. How cancel a query from vb?