January 7, 2015 at 7:26 am
This isn't actually a question, just thought I would share what I have learned in case anyone else runs into the same issue.
Occasionally, SSMS will return a "System.OutOfMemoryException" rather than the result set you were hoping for. Microsoft's documentation explains that this is caused by the SQL Client being a 32-bit process and a result set being larger than 2 GB, thus exceeding the address space of the application. But, what if your query was something like: Select top 1 idintegercolumn from sometable? Surely one integer value can't be greater than 2 GB?!
After having the above query fill the memory space of SSMS a few times, it dawned on me that the issue was not the result set, but was most likely intelisense, where behind the scenes SSMS was attempting to gather metadata on quite a few objects in the particular database I was working in (over 100k tables and 12k views, for starters).
I tested the same query, but this time using the master database and it worked fine, which backs up my hypothesis. Of course, I'm still open to another explanation, so if anyone has other ideas, I'd love to hear them.
Kind regards,
Ernest Libertucci
January 7, 2015 at 8:07 am
I've had the same error generating a massive execution plan - so intellisense would tie in.
The client is still 32 bit?
Doug
January 7, 2015 at 8:25 am
Yes, see knowledge base article here:
January 16, 2015 at 10:14 am
I get this error after my ssms has been open for a long time, and i have a few connections open. Generally I get it when trying to view job history for all jobs or something similar. I find if I close down SSMS and reopen it the problem goes away.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply