patternMinor
What does TOAD do, when I terminate script execution?
Viewed 0 times
scripttoadwhatterminatedoeswhenexecution
Problem
When it stops the execution of a long running script. The script terminating needs even longer then the time the script was running. I.e. I have to kill Toad.
2nd EDIT:
Just found that this is a feature of Toad and not of Oracle
In SQL developer, you can stop execution of long running queries and similar to SQL Server Management Studio you get can modify your query immediately.
2nd EDIT:
Just found that this is a feature of Toad and not of Oracle
In SQL developer, you can stop execution of long running queries and similar to SQL Server Management Studio you get can modify your query immediately.
Solution
Trace your session. I expect you will find Toad is waiting for Oracle to roll back your transaction - which Oracle will continue to do in the background even if Toad is killed.
Under the covers, when you abort a query, an Oracle client application sends OCIBreak(). However in order to actually process this, the shadow process on the Oracle side has to come back and read that message - it is a request only, there is no way to send a true interrupt (i.e. a signal in Unix terms) across the network. If the shadow process is in a state where it is itself waiting for an operation to complete (such as a big I/O request to the OS) then it is not until that completes that it can advance to the next "tick" and find the break command waiting for it.
If you are really impatient, you could get the same result by finding the shadow process (
Incidentally there is some clean-up to do when a long-running
Under the covers, when you abort a query, an Oracle client application sends OCIBreak(). However in order to actually process this, the shadow process on the Oracle side has to come back and read that message - it is a request only, there is no way to send a true interrupt (i.e. a signal in Unix terms) across the network. If the shadow process is in a state where it is itself waiting for an operation to complete (such as a big I/O request to the OS) then it is not until that completes that it can advance to the next "tick" and find the break command waiting for it.
If you are really impatient, you could get the same result by finding the shadow process (
v$process.spid where addr = v$session.paddr and sid=) on the server and just issuing a kill command at the shell. Incidentally there is some clean-up to do when a long-running
SELECT is aborted: the previous versions of the rows are no longer needed.Context
StackExchange Database Administrators Q#2470, answer score: 5
Revisions (0)
No revisions yet.