Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 sqlserver.exe increasingly using RAM

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-11-12 : 08:52:42
John writes "I have written a C# gui around a sql server time series database. I have to run some fairly processor intensive update queries (involving over a million rows) and some cross tabs with several joins. I use either ADO straight from C# or use ADO to call stored procedures. I have noticed that the memory allocated to sqlserver.exe (from task manager) seems to grow without bounds until my laptop refuses to function any more.
Why is the memory not being released after the queries terminate?
I have tried restricting sql server's memory allocation, but to no avail.

Thanks."

Andraax
Aged Yak Warrior

790 Posts

Posted - 2002-11-13 : 03:50:16
Have you monitored the number of connections open to the server? I once wrote a program which opened new connections and didn't close them down, which resulted in a similar problem as yours.

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2002-11-13 : 12:56:26
SQL Server will only release the memory if it doesn't need it anymore and if another program needs the memory. So if you have some kind of memory leak in your program, SQL Server will not release the memory because it thinks that it still needs it.

When you say "I have tried restricting sql server's memory allocation, but to no avail.", do you mean that you have set the maximum amount of memory SQL Server is allowed to consume? If that's the case, then SQL Server should not be using any more RAM than what you have configured it to use. So, maybe another program is using the RAM.

Go to Top of Page

jppowell
Starting Member

2 Posts

Posted - 2002-11-13 : 13:51:05
In response to Andraax, it doesn't seem to be anything to do with connections, as I made sure that I always close them right after running queries.

In response to tduggan, I have set the max memory that can be consumed but SQL Server still goes above this amount. I am sure it is SQL Server using the memory as it says sqlserver.exe and if I stop this particular instance the memory is freed.

Thanks anyway.

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2002-11-13 : 14:21:24
This sounds like a bug to me. Have you searched MS's knowledge base yet? If you can't find an article related to your problem, I would call MS and report the problem. SQL Server should not use more memory than what it is configured to use. My only other comment would be that maybe the amount of memory that sqlserver.exe is using includes the page file. I would doubt that this is the case because virtual memory is a separate number.

Go to Top of Page

jppowell
Starting Member

2 Posts

Posted - 2002-11-14 : 07:12:35
I'll try calling microsoft. I've been avoiding it until now, due to past experiences. I'll let you know what they say. Thanks

Go to Top of Page
   

- Advertisement -