Exception of type 'System.OutOfMemoryException' was thrown.

Single-click script execution on multiple SQL Servers.

Moderators: JonathanWatts, Anu Deshpande, dlkj, Colin Millerchip, Michelle Taylor

Exception of type 'System.OutOfMemoryException' was thrown.

Postby quinnpumps » Tue Oct 07, 2008 5:54 pm

Script is 25.5 GB. Using Vista Business on Quad Core 2.33GHz processor, 2GB of RAM. This error occurs when attempting to open the script.
quinnpumps
 
Posts: 1
Joined: Tue Oct 07, 2008 5:46 pm

Postby Robert » Thu Oct 09, 2008 5:04 pm

Assuming "GB" isn't a typo...!

I'm afraid SQL Multi Script needs to load the entire script into memory before executing it. On a 32-bit machine, each process is limited to 2GB of memory space, even if the system has more physical memory installed. [Edit: I've just checked and SQL Multi Script is currently set to run as a 32-bit process, even on a 64-bit operating system, so upgrading to Vista x64 won't help here]

We tested up to about 500MB scripts, if I remember correctly, but that's a couple of orders of magnitude smaller than what you're attempting.

Out of interest, what are you trying to do that results in such a gigantic script? :-)

Thanks,
Robert
Robert Chipperfield
Developer, Red Gate Software Ltd
Robert
 
Posts: 410
Joined: Mon Oct 30, 2006 11:15 am
Location: Cambridge, UK

Postby richardr » Fri May 14, 2010 9:12 pm

I am curious about this. I was running a script against 99 databases and failed on the "out of memory" error. The script is only about 3.5mb large and has about 17k lines of code.
Is there a limit to the lines of code? The machine that I used has 2GB of RAM and enough processor power to run these scripts.
Here is the context of the error:

SQL Multi Script has encountered a problem. Details are as follows:

Exception of type 'System.OutOfMemoryException' was thrown.

at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
at J.b(Object , DataTable )
at RedGate.SQLMultiScript.Engine.Engine.b(DataTable )
at RedGate.SQLMultiScript.Engine.Engine.b(Object )
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart(Object obj)

Thanks,
Richard
richardr
 
Posts: 2
Joined: Fri May 14, 2010 8:59 pm

Postby richardr » Tue May 18, 2010 5:50 pm

are these forums still monitored?
richardr
 
Posts: 2
Joined: Fri May 14, 2010 8:59 pm

Postby Brian Donahue » Wed May 19, 2010 11:21 am

Yes, the forums are moderated, but I assume that the person who replied to the topic would answer any further posts.

I don't know anything about this issue, so maybe it would be best to contact support@red-gate.com - at any rate I don't think this topic is simple enough to use the forum as a support channel.
Brian Donahue
 
Posts: 6669
Joined: Mon Aug 23, 2004 10:48 am


Return to SQL Multi Script 1

Who is online

Users browsing this forum: No registered users and 0 guests