Toad World® Forums

Execute large scripts

How would I execute a script that crashes Toad when run from the editor
e.g. lots of select statements like:

SELECT> tab_id, tab_code, COUNT(*) AS 'Count'

WHERE tab_id = 1234567 AND tab_code = 'XXX' AND tab_flag = 'T'
GROUP BY tab_id, tab_code

This runs fine for 1, 2, 3, ... N statements but not for 2000!
It fails if bracketed by BEGIN ... END or by 'F5' block execution in the editor

Hi Andrew,
is it really specifically the 2000th statement? Is there anything special about the statement?
Which connection and which version is it?
What are the specs of your machine?
Can you send us your exception trace?

Windows 10 Toad for SAP Solutions (64 bit)
There is nothing significant about any individual line of the script - just that over an indeterminate threshold Toad crashes when I try to run them all at once.

It isn't that the script fails when run in the editor - I can live with that.
What I am looking for is a way to execute a script other than through the editor.
ie. a command line connection and execution to a results file.

Have you tried running it within Automation?

Not yet – I can give that a try (learning curve!)


This will let you run the scripts unattended and make a report. I'm not sure if there's any limits to a number of statements though.