Re: Help! Canceling an Oracle query thorugh ADO takes almost as long to run as the query itself.

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Fri, 19 Jul 2002 16:11:55 GMT
Message-ID: <3D383A0F.CAD6B5DD_at_exesolutions.com>


John Boe wrote:

> Hello,
>
> I am writing a VB program that allows users to run queries in an Oracle 7.X
> database. I am using ADO 2.5 to connect to the database and run queries
> asynchronously. I need to allow users to cancel queries. However, the cancel
> method of the recordset object takes almost as long to run as the query
> itself. Once you issue the cancel command, ADO may wait a long time before
> moving on to the next line of code. The cancel method is quick when applied
> to a SQL Server database, but slow when applied to an Oracle database.
>
> Any ideas?
>
> Thanks,
> -John

Since you are (A) using a piece of Oracle software likely as old as you are and (B) haven't given even the slightest indication of how you are attempting to cancel things in Oracle any help you receive will be a shot in the dark.

The proper way to cancel a query in Oracle is:

ALTER SYSTEM KILL SESSION
[Quoted] or, if it was available back in the paleolithic period orakill or, as a last resort, if Oracle is on a UNIX box kill -9

Use of ALTER SYSTEM will likely require that the DBA write a stored procedure [Quoted] exposing this single functionality of ALTER SYSTEM to your program as likely [Quoted] they will not let you have direct access to ALTER SYSTEM.

[Quoted] I am fascinated though ... why would anyone be developing against software that [Quoted] is unsupported and is only behind the current release by 10 releases? I'll bet the version of SQL Server isn't that antique and yet you expect similar performance? Try upgrading to something sold at least within the last decade.

Daniel Morgan Received on Fri Jul 19 2002 - 18:11:55 CEST

Original text of this message