Solved

SQL - Exception of type System.OutOfMemoryException was thrown

Posted on 2013-01-14
7
3,859 Views
Last Modified: 2013-05-20
Once in awhile, checking SQL Integrity Check logs, I get this error.

Re-saving the job usually fixes it.  Or deleting it and re-adding it fixes it as well.

Anyone know why this is?
0
Comment
Question by:SoftwareMarketing
  • 4
  • 3
7 Comments
 
LVL 39

Expert Comment

by:lcohan
Comment Utility
Not knowing what SQL version/edition/service pack are you using it makes it a bit more dificult to tie it to a exact match however - did you checked this article allready?

http://support.microsoft.com/kb/909678
0
 
LVL 1

Author Comment

by:SoftwareMarketing
Comment Utility
Thats SQL 2000.

I'm sorry this happens on both 2008 and 2008 r2 SQL on both Windows 2008 and 2008 r2.  Both having the latest service packs.
0
 
LVL 39

Expert Comment

by:lcohan
Comment Utility
"Once in awhile, checking SQL Integrity Check logs, I get this error."


Can you post the actual error you are getting?

Did you checked SQL Logs and Event Viewer to see if there are any errors? What about SQL Agent Log and job history? Do they report anything unusual?
0
How does your email signature look on mobiles?

Do your employees use mobile devices to reply to emails? With mobile becoming increasingly important to the business world, it is in your best interest to make sure that your email signature looks great across all types of devices.

 
LVL 1

Author Comment

by:SoftwareMarketing
Comment Utility
I posted a picture.
0
 
LVL 39

Expert Comment

by:lcohan
Comment Utility
Sorry but I can't see any picture....
0
 
LVL 1

Author Comment

by:SoftwareMarketing
Comment Utility
The error is in the title as well.

Exception of type System.OutOfMemoryException was thrownError message
0
 
LVL 39

Accepted Solution

by:
lcohan earned 500 total points
Comment Utility
It may be that a large record set or some cartesian set from a poorly written query is causing it. Regardles please see details about mem config as recommended by Microsoft at link below:

http://msdn.microsoft.com/en-us/library/ms177455.aspx

“For 64bit systems, the virtual address space limitation is not an issue. However, if an application wants to "lock its memory" or avoid its working set from being trimmed, then it can achieve this by using the AWE APIs. Again, in order to use these APIs, you must have the 'lock pages in memory' privilege set. This is why for 64bit systems, you don't need to set the 'awe enabled' option to 1 (it is actually ignored on 64bit systems).”
We don’t enable AWE but lock pages in memory MUST be set for the account running SQL Server service in order to be able to use the extended above standard 4kb pages. I think that should clear the error message from SQL log and please read http://blogs.msdn.com/b/psssql/archive/2009/06/05/sql-server-and-large-pages-explained.aspx for more info.


http://support.microsoft.com/kb/319942/en-us

There is a great article about SQL Express idle time memory usage in this blog article: http://blogs.msdn.com/b/sqlexpress/archive/2008/02/22/sql-express-behaviors-idle-time-resources-usage-auto-close-and-user-instances.aspx (this article also details some other interesting facts about Express edition).
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now