Insufficient memory error when executing the script.

  • Hello Everyone,

    I am getting this error when I try to execute the script - insufficient memoryto continue the execution of the program(mscorlib)

    My script size is 42MB

    Sql server version - 2008R2 Express edition.

    How do i resolve this?

    Thanks in advance,

    Sanjay

  • for a large script, you'll want to execute it via sqlcmd instead of trying to open it in SSMS and executing it.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Yes Thanks, But i want to know that If there is limit for the script size.

  • No, and this is not a SQL Server error. It's an error from the client tool, Management Studio. Management Studio's a 32 bit app, so 4 GB memory limit, it doesn't work well with large scripts (which is why it's not advised to script data)

    If you have larger scripts, you'll need to use something like SQLCMD to run them.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thanks Gail.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply