What are the challenges you face when working across database platforms? Take the survey

Exception of type 'System.OutOfMemoryException' was thrown.

quinnpumpsquinnpumps Posts: 2
edited April 9, 2015 6:22AM in SQL Multi Script
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.


  • Options
    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? :-)

    Robert Chipperfield
    Red Gate
  • Options
    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)

  • Options
    are these forums still monitored?
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    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.
  • Options
    I had the same error. Reviewing in detail I could see that it was error generating the DevExpress Grid component, which shows the result of the execution of Scripts.He solved the problem eliminated PRINT and set the SET NOCOUNT ON. :D:D:D:D
Sign In or Register to comment.