Getting an error "Exception of type 'System.OutOfMemoryException' was thrown." during stored procedure execution

  • I had seen this error when I was processing tons of records on a virtual machine. My solution was breaking the query down into batches. That is, using a loop to only process about 5,000 a time. Do you happen to know how long your query would take to execute without the out of memory hangup?

    ----------------------------------------------------

  • Pls help me on this.

    Pradeep

  • what your issue. symptoms?

    Adam Zacks-------------------------------------------Be Nice, Or Leave

  • When i am doing right click database >> Task >> restore >>database. I am getting below error

    "Exception of type 'system.outofmemoryexception' was thrown"

    Server configuration :

    32 GB RAM

    64 bit O/S

    2 processors

    Intel(R) Xeon(R) E5620 @2.40GHZ

    service pack 2

    SQL server 2008R2 (Standard Edition)

    Note: In that server over all 850 databases which around 120 GB. And log shipping configured around 750 databases.

    Error screenshot attached for ref.

    thanks,

    Pradeep

  • Are you running SSMS locally or on the server?

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • Sean Pearce (9/10/2013)


    Are you running SSMS locally or on the server?

    was just going to say that 🙂

    Try running as tsql.

    Adam Zacks-------------------------------------------Be Nice, Or Leave

  • I tried both locally and server also.

    Pradeep

  • pradeep.mohan (9/10/2013)


    I tried both locally and server also.

    tsql?

    Adam Zacks-------------------------------------------Be Nice, Or Leave

  • tsql restoration script is working well.

    Pradeep

  • also, have you run an estimated ex plan?

    where is the main load?

    it may be your query.

    Adam Zacks-------------------------------------------Be Nice, Or Leave

  • pradeep.mohan (9/10/2013)


    tsql restoration script is working well.

    have you restarted ssms? as in made sure the task is ended?

    Adam Zacks-------------------------------------------Be Nice, Or Leave

  • Yes, we restarted server also because RAM up-gradation happens on 2 back days back only from 16GB to 32GB

    Pradeep

  • when you said that tsql works, what did you do?

    did the successful run come from ssms, sqlcmd or some other means.

    Adam Zacks-------------------------------------------Be Nice, Or Leave

  • my question is why out of memory error is thrown when i am doing restoration using GUI

    Pradeep

  • so your problem is that when doing a db restore or some other ssms active diag drive task, your get the outofmemory and then what? what happens when you click ok?

    do you get a red X over the active content part of the window, but the task goes on to complete?

    If so, i wouldnt worry too much, i dont know why or what causes it, just that its irritating but doesnt seem to cause any harm.

    Adam Zacks-------------------------------------------Be Nice, Or Leave

Viewing 15 posts - 16 through 30 (of 42 total)

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