Run the statements (or script) "in background"

Not really in the background, but allow to operate with TOAD options / windows while the editor runs the query.
While it is processing I would open a new session browser window or scroll up the script output / dbms_output windows, etc.
The progress window would still be on but not modal.

I know I could have run it in TSR but ups... too late it is already running in the editor.

Great idea. Toad has an option to "run scripts in same session as main Toad connections". If that is enabled, this isn't possible, but if the script has its own session, there isn't much of a reason to make you wait while the script executes.

I found "Execute scripts in TOAD session" option - I assume this is what you meant.
Why is it not possible when this is enabled? The actions I described do not interfere with the running session...

Yes, that's the option that I meant.

If we make script running non-modal, we can't (and don't want to) control what else you'll be doing in Toad (outside of the editor tab where the script is running).

We don't want 2 windows in Toad competing for the same session, because a session can only execute one SQL at a time.

Yeah, I see. When I think about it, I guess I saw a discussion on this before...
Well, I can always open a new TOAD to browse sessions etc, but it would be nice to review the script's output while it is running even in a single session mode.

Wow, it looks like this is already implemented in beta 13.2.0.230 !

I didn't make any changes for this. Maybe you have some option set differently now?

Well, I cannot reproduce it after the TOAD restart.
It must had "gone wild" - the Processing Script window was not showing; the script was executing normally with the editor window highlighting the script line.
Now all this is back to "normal" :cry:
Processsing%20Script

If I manage to reproduce will post here (I suspect connection time-out and reconnect).

An alternative could be to offer an option "Run in New Session" and "Run Script in New Session" which would open another session with the same DB and execute there regardless of the global setting?

Or even a "run in background" button on the "processing script" dialog. That would be nice.

Wouldn't that have the same implications you have mentioned before?

I sometimes have the same problem of starting a long running task and having to open another instance of Toad for a Session Browser or whatnot. If I could opt-in to run something in the background within a new session (much like "run scripts in same session as main Toad connections" but on the fly and without the modal dialogue) that would potentially save me a ton of time I otherwise have to spend opening Toad, connecting, maybe load some of the script already opened in the first instance and so on...

Another possible solution would be to enable switching sessions (including starting a new one) in the same Toad instance. But I doubt this would be easy to achieve with the current modal dialogue.

Yes. We could only run in background if the "Execute scripts in TOAD session" option were unchecked when the script began. In this case, a separate session is created for the script.

I mentioned it because OP said "I know I could have run it in TSR but ups... too late it is already running in the editor." so I was trying to think of what we can do after it is already started....

I know. My proposal now is to have this option "per Editor" without the need to globally enable the setting - which was sort of unrelated to your comment about the "run in background" option on the script dialogue, sorry for that :wink:

Yes. And it's a good idea, but like TSR, you have to think to click the right thing before you start your script. So I was trying to think of some way to help for when user forgets.

Also very good to have, as that may happen "sometimes" :slight_smile: