Toad for DB2 Out of Memory error during execution of query statement, code, or script. Toad hangs or freezes, and a box with red 'X' appears or are drawn on some Toad internal windows. The query accesses several millions rows of data.
ERROR:
System.OutOfMemoryException
Out of Memory.
Try the following and see if this will resolve or lessen the issue. However, be aware that the Out of Memory issue can still happen, especially when the system memory limits are reached:
A)
Modify the query or split the query into different runs i.e. 1 million rows at a time instead of several millions rows in one run. If the tables have hundreds of ‘Columns’, BLOB / CLOB or 4 gb size columns, then the example numbers above would be much lower i.e. 1/10/100 thousand rows at a time.
B)
Increase the Virtual Memory size:
Windows 7:
C)
Reset your Toad to factory defaults to clear temp / cache files.
1) Fully exit Toad for DB2.
2) Go to:
XP: C:\Documents and Settings\\Application Data\Quest Software (or Dell)\
Vista or 7: C:\Users\ \AppData\Roaming\Quest Software (or Dell)\
3) Rename the “Toad for DB2 x.x” folder to “Toad for DB2 x.x OLD” (where “x.x” is the version number).
4) Start Toad for DB2.
5) When asked if you want to ‘Migrate’ settings from a previous version, choose “CANCEL” or “NO”.
6) Re-test the issue.
NOTE: If you would like to transfer back your Saved Connections in the Toad log-in screen, see the steps below. IMPORTANT: Re-test the issue first before performing these steps.
1) Fully exit Toad again.
2) Go to the OLD “Toad for DB2 x.x OLD” folder you renamed in Step 3 above.
3) Perform a Copy on the “Connections.xml” file (make a backup of this file just in case of errors).
4) Go to the NEW “Toad for DB2 x.x” folder that was just created by Toad.
5) Paste the “Connections.xml” file there.
6) Start Toad and you should now have your previous Saved Connections in the log-in screen.