msSQL Server memory issue

James

Expert Member
Joined
May 26, 2004
Messages
2,617
Reaction score
3
I have a msSQL server that every day and hour that pass's it sucks up more and more ram and does not wanna give it back the greedy bastid. The only way I can stop this is to periodicaly restart the SQL server. Is there some way to get the server to dump the memory at certain intervals? Has anyone else had any roblems like that?

Thanks
 
w1z4rd said:

In the good old days of NT 4.0 and Microsoft first attempts at doing a SQL Server product in which they had modified code they had originally gotten from Sybase we simply had a cron job (see Windows "at" command) to reboot our front end boxes at midnight to stop memory leaks and the rather flaky X.25 drivers used by the boards we were using.
 
It is a msSQL Server 2000 running on a Windows 2003 webserver serving multiple websites. It can't be tied down to any specific program of query as regardless just over time the memory usage gradually goes up and up and it never seems to drop.
 
James, the info is a little to scarce to really give an answer. Either try tibby's suggestion, or PM me, and we can discuss me trying to find some time to come and analyse the situation on site...

my rates really are reasonable! :D
 
I was under the impression that SQL server will occupy all available RAM on a server, and as other applications need ram, will release it. We have servers running with excess of 32gigs RAM etc, and SQL uses all of it (for caching etc.)
 
Ap0c said:
I was under the impression that SQL server will occupy all available RAM on a server, and as other applications need ram, will release it. We have servers running with excess of 32gigs RAM etc, and SQL uses all of it (for caching etc.)

That is my problem. SQL Server is a greedy greedy mofo and does not wanna share. It does not seem to be releasing the memory
 
Ap0c said:
I was under the impression that SQL server will occupy all available RAM on a server, and as other applications need ram, will release it. We have servers running with excess of 32gigs RAM etc, and SQL uses all of it (for caching etc.)

I was going to say the same thing - mssql does this.

Simply set the SQL server to use less memory (i no longer use this product, but if memory serves, there is a configuration option in the mmc).
 
That's pretty odd. I've never noticed our SQL server do anything of the sort... sure there's not an infinite loop churning away happily on one of the sites?
 
Depending on the size of the DB, and the queries being run SQL will use all avail RAM for caching. Its the norm. From what I understand, and have seen, SQL will reduce RAM usage when other apps need more RAM.

James, are you sure your other apps require more RAM ? What are the other apps? How big are your DB's? How many connections are there? How much RAM does the box have?

Btw, if people do not code correctly, they will connect to the DB and not close the connection. This uses a LOT of ram - check the number of connections to the DB.

hope this helps.
 
RAM - once used - is not freed up unless necessary.

So, if you had to run a query

PHP:
SELECT * FROM ReallyBigTableWithNoIndex ORDER BY SomeCharField

and it uses 2GB before turning to disk swap, that 2GB will be left "used".
 
I've always found:

IIS - own server
SQL - own Server
Exchange - own server

or use Linux. :p
 
One can use enterprise manager to change the memory usage. If you are unsure of how to do it, I would strongly suggest that you get someone who does, a call to Microsoft will get you a list of their partners.
 
Top
Sign up to the MyBroadband newsletter
X