I am convinced that this was not the behaviour in 6.5, 7.2, 7.6, 8.6, 9.2 or any flavour of 10
The oldest I have is 10.6 and 10.6 works the same as 11.6 and Toad 12, but the behavior does seem a little odd. The execute as script dude is out of the office for several
more days, but I’ll forward this onto him in case there’s some technical reason why it’s not behaving the same as F9.
should it make a difference?
I’d think it should not, but I’m not the expert in the script execution department.
This is slightly off topic, but generally speaking F9 is better for single statement execution. When I think of a script I think of a series of 2…N statements. Several options
and features apply to F9 only. Compiling with debug is F9 only. Auto Trace is F9 only. Optimizing compiler value, substitution variable prompting, SQL Recall and Query Viewer (tab and window) are all F9 only. F9 uses much less memory when your result set it
large. Results are fetched in pages or blocks. The next page is loaded when you scroll to the bottom of the grid. Execute as script fetches all rows and creates a grid to display them as well as prints all of the data in plain text assuming you don’t have
the server output turned off. That’s not to say that executing with F5 doesn’t have a place in single statement execution especially if you want the SQL*Plus style text output, but F9 is the better tool for the job in most cases.
From: martin.shaw17 [mailto:email@example.com]
Sent: Tuesday, June 18, 2013 2:47 PM
Subject: RE: [Toad for Oracle - Discussion Forum] Toad 11 autocommit
Bert, I understand the concept of threaded queries, and commits per session. The whole point of using threads is to allow me to have separate sessions as I operate on multiple schemas at any
one time as multiple users and it allows me to see and validate changes made in one session from all other sessions, when I expect those changes to be seen. When I enable autocommit, if I execute a statement, under the covers Toad has always added in a commit
in that thread when this feature is enabled. I have never encountered a problem prior to this release where the autocommit does not work as advertised, and have always set these options the same way for many previous versions. Additional options for Toad are
the “Run query in thread” in the query builder (which I have probably used a couple of times only) - in my case it is enabled, and the “Apply commit/rollback to all tabs (threaded queries)” option for the Editor behaviour, which I would never have enabled
unless I needed a correlated commit across sessions/threads (and in my case is not enabled).
Michael, thanks for the test session - you may have found the source of the issue - the autocommit certainly does not appear to work as advertised/expected when running a script. I had a script
of a series of insert statements which I executed, and expected to see each committed as it executed in another session. the data only appeared when I ran an explicit commit, or used the commit button on the editor window. It would seem that the autocommit
actually commits when an execute command is issued (F9), but will only autocommit the results of a script execution (F5) with a commit statement, or when closing the thread/session by closing the connection. I am convinced that this was not the behaviour in
6.5, 7.2, 7.6, 8.6, 9.2 or any flavour of 10, but do not have any of my prior versions on which to check. It is just that these are the versions I can recall using over the years, and have never run into this behaviour before with any of them. If you say that
your 10.6 version commits an execute but not an execute as a script, I cannot argue against that. According to the Toad Help, and all the docs that I have ever found, the Autocommit will issue a commit “… every time a statement is run …” - it does not
differentiate between running a statement using F5 or F9 - should it make a difference?