Keep query running and auto optimizer running if disconnected from the database

Is there a way to keep a query running and auto optimizer running if disconnected from the database? I have to use a vpn to connect to my database. Unfortunately the vpn has a quick timeout. Does toad have any tools to deal with this problem?

Unless Toad (and thus the Optimizer) has been installed on the database server (not best practice) there's nothing in Toad that I'm aware of that will override the VPN config from remote workstation to database server.

Anyone out there have a creative alternative?

Maybe a PowerShell script that uses Invoke-WebRequest to perform a GET against some internal web site periodically will do it.

There is no way that you can keep Toad aware of anything going on in the database after connection is lost, but the following steps may prevent connection from being lost in the first place.

If database activity will prevent the timeout, you can open Toad's transactions window and configure it to refresh periodically.

Click here:

This window opens:

Check these two boxes:

Now, Toad will poll the database every 10 seconds to see if a transaction (DML with no commit/rollback) has begun. This is a very quick check and won't disrupt anything else going on in Toad. But maybe that activity will prevent your disconnects.

You can click the icon from the first screen shot again to close the transactions window. Because you clicked "Always", it will continue to run in the background.

When a connection is detected to be in transaction, you'll see an asterisk appear here