Toad World® Forums

End Connection on a disconnected session

When End Connection is used on a session that's already disconnected Toad prompts you to reconnect. This makes no sense. Cancelling the prompt doesn't help as it comes up multiple times depending on how many windows you have open.

This is a pain because sometimes it's impossible to reconnect (lost VPN) and I just want to close the session.

You're right, reconnect makes no sense at that point. I'll see if I can reproduce this and fix.

Here's what's happening:
When you disconnect, depending on your options, Toad will check to see if you are in transaction or not and commit/rollback if so (according to more options). And I guess we've got some global code somewhere that's just offering to reconnect because of the "disconnected" type error.

You may be able to prevent it by going into Options -> Oracle -> Transactions.
Change "when closing connections" to "just disconnect" (Oracle will implicitly commit in this case)

I'm a fan of your avatar, by the way.

Thanks for quick response. That probably would avoid this issue but it will introduce another issue if there really is an outstanding transaction on a live session.

If there is an outstanding transaction on a live session, and you have "just disconnect" selected, the transaction will commit. Try it.

Yes, I understand that. What if I want to rollback instead? I need the choice.

Gotcha. Yes, you would lose that possibility. You'd have to remember to manually rollback in that case.

I'll try to reproduce this and fix it. Thanks for reporting it.

Edit: I can reproduce this by

  • "Execute queries in threads" is checked
  • Run a Select with F9 in the editor
  • kill the session created by the F9
  • End connection

I am logging the bug and will have it fixed soon.

The Execute queries in threads is off for me.

I noticed the behavior is different in version 14 which I just installed. It seems to be fixed.

Here is the debug.sql from my test with version 13.3

-- Session: xxxxxx@DEV-I
-- Timestamp: 15:04:38.040
select 'x' from dual;


-- Timestamp: 15:04:57.306
Disconnect: xxxxxx@DEV-I
-- ORA-03113: end-of-file on communication channel
Process ID: 12090
Session ID: 1590 Serial number: 19026

1 Like