Toad World® Forums

Toad fails to abort routine when I hit escape

All,

I’m not sure this is a Toad issue - might as well be an Oracle issue.
When I execute:

begin

sys.dbms_lock.sleep(seconds => 9);

end;

and then hit Toad issues a message in the bottom line: ‘Execution cancelled’ yet it appears the statement keeps processing according to the following symptoms:

  • cannot close Toad
  • in the lower right corner the progress blocks keep moving
  • cannot execute any statement. Hitting Ctrl-Enter bahaves like a normal Enter.
  • under Debug, the Halt Execution option is still enabled, although it does nothing when I click itn

If possible at all, I would like my Esc request to be handled by aborting the current unit-of-work.

In case that is not possible, would it then be possible to have a proper message in case an abort request is not accepted by Oracle?
From the symptoms above it seems Toad is aware the executing statement refuses to be aborted.

Thanks in advance,
Abe Kornelis

Toad sends a cancel request and waits for Oracle.

have a proper message in case an abort request is not accepted by Oracle

There is no notification from Oracle letting us know if it was accepted. The behavior you see where the query is still executing is your notification that it hasn’t been canceled yet. :slight_smile:

Michael

On 05/01/2015 07:19 AM, kornelis.abe wrote:

Toad fails to abort routine when I hit escape

Thread created by kornelis.abe
All,

I’m not sure this is a Toad issue - might as well be an Oracle issue.

When I execute:

begin

sys.dbms_lock.sleep(seconds
=>
9);

end;

and then hit Toad issues a message in the bottom line: ‘Execution cancelled’
yet it appears the statement keeps processing according to the following symptoms:

  • cannot close Toad

  • in the lower right corner the progress blocks keep moving

  • cannot execute any statement. Hitting Ctrl-Enter bahaves like a normal Enter.

  • under Debug, the Halt Execution option is still enabled, although it does nothing when I click itn

If possible at all, I would like my Esc request to be handled by aborting the current unit-of-work.

In case that is not possible, wo uld it then be possible to have a proper message in case an abort request is not accepted
by Oracle?

From the symptoms above it seems Toad is aware the executing statement refuses to be aborted.

Thanks in advance,

Abe Kornelis

==========

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - Beta
notifications altogether.

Toad for Oracle - Beta Discussion Forum

Flag
this post as spam/abuse.

Michael,

thanks for your prompt reply. I understand that there is nothing you can do about this behaviour. Yet it baffles me that Toad behaves differently while the query is still running. If software behaves differently under certain circumstances, then somehow the information must be available, right? But then, if the info is available, you should be able to do something with that info. Where am I erring in my logic?

Abe

===

I don’t think I follow you completely. How is it behaving differently? Until the cancellation request has been processed Toad is still showing that it’s executing except that it says “Execution Cancelled” in the status bar. That is a little misleading since it’s shown before everything has wrapped up. Other than that everything appears to be consistent when I run through your example.

Michael

It’s more obvious what’s going on if you don’t use the threaded queries option. In that case you see a dialog that changes over to “Cancelling…” or something similar. With threaded queries enabled there’s nothing done to block you from working so the only visual indicators you’ll see are the throbber at the bottom right, Toad can’t be closed, etc.

Michael,

In your post from 6:19 you asked: “How is it behaving differently?”

I think your post at 6:23 answers the question: “the only visual indicators you’ll see are the throbber at the bottom right, Toad can’t be closed, etc.”

If Toad cannot be closed, and if Ctrl_Enter does not start a query but inserts a new-line character instead, then somehow Toad behaviour is being influenced by the fact that the query has nor properly been cancelled.
I do not know how these circumstances affect Toad behaviour in the extent that they (observably) do, but it does happen. One would think that somehow, this information must be available to Toad: “cancellation of thread still in progress”.

building on the conclusion above that Toad must somehow be aware of the still-pending status of the cancellation request, would it then be possible to issue a stronger command to Oracle to cancel the thread immediately?
Or, alternatively, to disconnect from the thread on the Toad side, so that Toad behaviour reverts to normal? Brining up a pop-up to allow me (the user) to choose how to deal with the strong-headed thread refusing to be cancelled would be quite ok, of course.

Returning to the basic why: I love it that I can continue to edit while the query executes. I have no problems with the need to cancel a running query, in case I want to run a modify version.
But I detest of having to use windows to force-close Toad in order to be able to issue a new query when Oracle refuses to cancel a thread.
It is cumbersome, time-consuming and tedious because - apart from closing and restarting Toad - I have to save and re-establish all work in progress.

I’m on the ouside looking in, and from my vantage point it looks like it should be doable.
However, you’re on the inside and should be able to determine whether or not my conjecture is correct.

If it’s not doable, then so be it.

Kind regards,
Abe