473,406 Members | 2,847 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

insufficient memory to run this query

We seem to have developed a memory leak in our sql server application
and are getting the above error on occasion. Also, over several hours
of hard usage the memory consumed by the sql server ramps up and is
never released. The only thing we have found to remedy the problem is
to stop/start sql server.

My question to the group is, how can I debug this problem? Are there
system stored procedures that would be useful in indentifying any temp
tables, cursors, etc, not getting cleaned up?

Thanks,
John

Jul 23 '05 #1
2 8633
(jo************@inginix.com) writes:
We seem to have developed a memory leak in our sql server application
and are getting the above error on occasion. Also, over several hours
of hard usage the memory consumed by the sql server ramps up and is
never released. The only thing we have found to remedy the problem is
to stop/start sql server.

My question to the group is, how can I debug this problem? Are there
system stored procedures that would be useful in indentifying any temp
tables, cursors, etc, not getting cleaned up?


There are two completely different issues here. One is that SQL Server
appears to grab all available memory in the machine. This is perfectly
normal. By default, SQL Server allocates as much memory that is available.
This is because, the more data it can have in cache, the better the
performance. The one situation when this does not work well, is when
other applications also are running on the machine. While SQL Server
will yield memory, it may not yield fast enough. So in this situation,
it may be an idea to constrain how much memory SQL Server may use.

The other issue is the error message you get. This message could be the
due to an overload of the server, but it could also be due a bug, stemming
from a particular query that SQL Server does not handle properly.

There are not really very many ways that you can achieve a memory leak
from application programming. I only know of one: failure to call
sp_xml_removedocument once you are done with an XML document. Another
way to waste memory is bad usage of DBCC PINTABLE.

If you search for 701 (which is the error number for the message in
question) in Books Online, you will find a topic which gives some
advice about the error.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #2
Hi

You don't say what version of SQL Server you are at, if you are not patched
up then you may want to consider doing that. You can monitor connections and
what is happening through profiler and resource usage can be monitored by
performance monitor or task monitor.

Another alternative may be to walk through your code.

SQL Server taking all the memory is not necessarily a problem unless you are
not using the server for the one task. You may want to set a maximum value
for it to use either in the server properties in EM or through sp_configure.

This could be just some poorly written code (which profiler should
highlight) or it could be the Slammer worm it is not necessarily a memory
leak.

John

<jo************@inginix.com> wrote in message
news:11********************@f14g2000cwb.googlegrou ps.com...
We seem to have developed a memory leak in our sql server application
and are getting the above error on occasion. Also, over several hours
of hard usage the memory consumed by the sql server ramps up and is
never released. The only thing we have found to remedy the problem is
to stop/start sql server.

My question to the group is, how can I debug this problem? Are there
system stored procedures that would be useful in indentifying any temp
tables, cursors, etc, not getting cleaned up?

Thanks,
John

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Bernard André | last post by:
Hi All, context: I am using Access 97 tablkes with VB. I can see records in the MDB, using Adodc and datagrid. No problem. But when doing: rsprivate.AddNew rsprivate!For =...
0
by: Sean | last post by:
I received this error when a trigger attempted to perform an update to its own table with a where clause that did not guarantee a single row. I believe this results in the iterative firing of this...
3
by: Bert | last post by:
I am sertainly no SQL expert so I am looking for a bit of help (actually quite desperate). The extra CPU and 1GB of RAM to be added to a server (Compaq DL380 G2: 1.4 GHz PIII with a Gig of RAM)...
4
by: slaprade | last post by:
I am loading a weeks worth of web logs into a dataset using Imports Microsoft.Data.Odbc These are text - fixed length fields so I have written a schema for them. The adapter fill looks like this...
2
by: bostonnole | last post by:
I am getting this WinIOError "Insufficient system resources exist to complete the requested service" when I try to execute the following code in an ASP.NET 1.1 application uploading a very large...
7
by: Salvador | last post by:
Hi, I am using WMI to gather information about different computers (using win2K and win 2K3), checking common classes and also WMI load balance. My application runs every 1 minute and reports...
0
by: John | last post by:
I am using SS2005 on XP and things have been good. Today I installed "Microsoft SQL Server 2000 DTS Designer Components" (I can't think of what else could have caused the problem), and now in...
13
radcaesar
by: radcaesar | last post by:
We are Running a .sql script which was created by tablediff.exe using SQLCMD The script execution fails with the ' 701: There is insufficient system memory to run this query. ' Exception. The...
0
by: mauler05 | last post by:
I have scheduled a SSIS package to run repeatedly by creating a scheduled SQL job that runs every minute . After every hour the packgae fails with the following error Description:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.