System.OutOfMemoryException | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

System.OutOfMemoryException

Hi, My query returns only one row. estimated row size is 5478. All other queries run fine but this particular query is throwing System.OutOfMemoryException. When does SQL server throw this error for a particular query only? This is the query which is throwing error System.OutOf Memory exception SELECT * FROM MemberDetail MD INNER JOIN Users ON Users.g_User_Id=MD.g_User_Id WHERE Users.u_logon_name=’anna’ Environment is .Net and SQL Server http://weblogs.asp.net/pleloup/archive/2004/04/01/105492.aspx Please help!
hi,
I think its nothing to do with the query.
The error is because of .net framework.
I think you need to handle the System.OutOfMemoryException class in .net properly.
Check this
http://www.kbalertz.com/kb_816978.aspx
i get the out of memory exception when i am building complex views in the SQL Server 2005 June CTP…if ranjitjain is right, looks like microsoft needs to handle the error properly too! ‘I reject your reality and substitute my own’ – Adam Savage
In that case: – The CLR does not release unmanaged resources which your program objects have used. Your code must explicitly release unmanaged resources by calling the Dispose method on objects which have used unmanaged resources. – Under some circumstances, the CLR will not remove large unreferenced objects from memory without help from your code. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
Thanks to All Its been very helpfull.
Thanks once again.
quote:Originally posted by PAMUR Thanks to All Its been very helpfull.
Thanks once again.

********** Pamur….what did you do to fix the issue? I’m running into the same error. Thanks!
Have you checked the steps defined above? Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
I can run the query in Enterprise Manager or Query Analyzer just fine.
Check the SQL error log and for any dump file when this strikes again. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
Well…..I fixed the issue by telling my list object to break to a new page on change of grouping. I am able to now get a +1000 page report. I don’t think the customer can or would want to print / export it, but at least for my issue, the data getting displayed is resolved. Thanks!
]]>