Out of Memory Error - Help Please

  • Hello,

    I have just run a large update using T-SQL in SSMS which completed successfully after a little over an hour. However, in another query window I tried to run a COUNT(*) query on the updated table and I receive the following error :

    An error occurred while executing batch. Error message is: Exception of type 'System.OutOfMemoryException' was thrown.

    Is there something not releasing memory after a large update or other DML statement that I should be aware of?

    I would imagine that exiting SSMS and going back into it would fix the issue, but I'd prefer to understand how to resolve this - or at least understand what's happening - if possible.

    Any advice would be appreciated.

    Regards

    Steve

  • That's a client error. You've run your client machine out of memory.

    It's not a SQL Server error (and so unrelated to caching of data pages on the server) because SQL Server doesn't use .Net managed code for its memory management, and 'System.OutOfMemoryException' is a .net error.

    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
  • GilaMonster (2/8/2012)


    That's a client error. You've run your client machine out of memory.

    It's not a SQL Server error (and so unrelated to caching of data pages on the server) because SQL Server doesn't use .Net managed code for its memory management, and 'System.OutOfMemoryException' is a .net error.

    Doesn't SSMS use .NET?

    If so, then isn't there an issue with the way SSMS uses .NET with regards to memory management?

    Also, I am able to run other applications without any problems on my machine, so I am not certain that the machine itself is out of memory.

    .... Yep, just exited SSMS and went in again and ran the same query that originally caused the exception and it works fine now.

    Isn't this perhaps an SSMS issue in respect of the way it uses .NET?

  • raotor (2/8/2012)


    GilaMonster (2/8/2012)


    That's a client error. You've run your client machine out of memory.

    It's not a SQL Server error (and so unrelated to caching of data pages on the server) because SQL Server doesn't use .Net managed code for its memory management, and 'System.OutOfMemoryException' is a .net error.

    Doesn't SSMS use .NET?

    Yes it does. That's why I say it's a client error, not a server error[/quote]

    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

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

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