x
login about faq Site discussion (meta-askssc)

Error 6513 Failed to initialize the CLR due to memory pressure

Hi Everyone,

When I tried to execute following query in SQL Server 2008, below mentioned error is cropping up. Please help…

Query: select * from tbl_users

Error Message: Msg 6513, Level 16, State 27, Procedure tbl_users, Line 1 Failed to initialize the Common Language Runtime (CLR) v2.0.50727 due to memory pressure. This is probably due to memory pressure in the MemToLeave region of memory. For more information, see the CLR integration documentation in SQL Server Books Online. Msg 474, Level 16, State 0, Line 1 Unable to load the computed column definitions for table "tbl_users".

Thanks,

Veejay

more ▼

asked Sep 03 '10 at 04:15 AM in Default

vijay 2 gravatar image

vijay 2
236 12 18 20

(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

With reference to http://support.microsoft.com/kb/2003681, the message is suggesting that you do indeed have memory pressure and points you towards http://support.microsoft.com/kb/969962 which will guide you towards possible solutions and further reading.

I would be very careful applying any changes to the MemToLeave (you can easily find many references and 'fixes' about this on Google) - in the past I have only applied memory config tweaks AFTER consulting with Microsoft Support. If you have a support contract or MSDN subscription with support, I would be tempted to use those.

As for the cause - the 'computed column' in the definition of tbl_Users is the culprit - you may want to post the definition here to see if anyone can help with that.

more ▼

answered Sep 03 '10 at 04:51 AM

Kev Riley gravatar image

Kev Riley ♦♦
46k 38 43 69

(comments are locked)
10|1200 characters needed characters left

The error message is pretty clear here. There is a computed column on tbl_users that is computed using a CLR function. This cannot be loaded due to memory pressure on your system.

Take a look at the system to see what is using all the memory and sort that out. A starting point may be to see how SQL Server memory min. and max is set. Maybe set the max setting a little lower to free up some system memory. However, I am not too sure about memory management for SQLCLR and how that is governed (anyone else?).

more ▼

answered Sep 03 '10 at 04:44 AM

WilliamD gravatar image

WilliamD
25.3k 16 18 41

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x598
x67
x23
x7

asked: Sep 03 '10 at 04:15 AM

Seen: 4109 times

Last Updated: Sep 03 '10 at 06:59 AM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.