Solved

SQL - Exception of type System.OutOfMemoryException was thrown

Posted on 2013-01-14
7
3,942 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
ID: 38778888
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
ID: 38801224
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
ID: 38806100
"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
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
LVL 1

Author Comment

by:SoftwareMarketing
ID: 38806121
I posted a picture.
0
 
LVL 39

Expert Comment

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

Author Comment

by:SoftwareMarketing
ID: 38811568
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
ID: 38811640
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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

911 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

27 Experts available now in Live!

Get 1:1 Help Now