Toad World® Forums

Cannot cancel long running queries


#1

Sometimes the timer is not updated any more and the cancel button does not work.

I have been able to reproduce it with the following code, the time it takes to crash is always different.

CREATE FUNCTION sleepy RETURN NUMBER AS BEGIN
  dbms_lock.sleep(1);
  RETURN 0;
END sleepy;

SELECT sleepy()
  FROM dual
 CONNECT BY ROWNUM <= 3600;

image
image


#2

Peter, my understanding is that we send the break command to Oracle and await its response. The time it takes to return depends on factors outside of our control. Your sample for me cancels almost immediately on my local database. I canceled quickly and again after letting it run for many seconds. In every case it canceled in less than a second.

Are you getting an exception dialog or by crash do you mean the cancel button becoming unresponsive and the timer stopping? An exception would be unexpected unless it's an ORA error of some sort.


#3

The dialog becomes unresponsive, the Execution time is not updated any more.

When I click the button the title is changed by windows (roughly translated to "no response") and I get a waiting cursor.

With this test query Windows usually asks if it should "try to restore the program".

I get this exception afterwards:
image
With real queries this window is not displayed so I have to kill TOAD most of the time.

I cannot always reproduce this - no idea when this happens and when it does not, sorry.