Heisenberg Heisenberg - 2 years ago 202
SQL Question

Exiting TOAD while cancel pending?

Quick question: Does exiting out of TOAD (for Oracle) while it is trying to cancel a pending query harmful?

Should I be letting this dialog box run its course?

I did have the screenshot but am unable to post pics until I have 10 reps.

EDIT: It has been going for around 30 minutes now.
EDIT2: I should mention it is not an update query, purely search.


Answer Source

When this happens and I've already waited long enough (and the Cancel button has no effect), I open Task Manager and apply "End Process Tree" command on the Toad.exe process.

If a database connection is lost, all uncommitted changes made are automatically rolled back by the database. So it is not harmful.

Once I investigated this by looking up the sessions list. It looks like this happens when Toad somehow loses the connection to the server in the midst of executing a query.

When you wonder why the query is taking so long (when it shouldn't) and click the Cancel button, Toad enters a state of "limbo" where it's waiting for the result of the cancel operation from the server (not aware of connection loss).

The problem is that there is no way to stop this waiting and go back to normal. This is a bug in Toad. There is no other way around this. I am not sure when they will fix it, if at all.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download