Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

As soon as i start SQL Server with no application querying ,in the task manager it starts to consume memory very fast till it consumes around 15GB. Can any one tell me how to resolve this issue. Thanks.

share|improve this question
This post may be of some use. –  DMK Nov 21 '12 at 13:18
It's doing what it should, for best performance. What issue are you referring to? Is this causing any other effects? Or are you just concerned about the amount of memory used? –  MatBailie Nov 21 '12 at 13:20
You have queries on the server, you just don't know you do. –  Remus Rusanu Nov 21 '12 at 13:21
add comment

migrated from stackoverflow.com Nov 21 '12 at 21:13

This question came from our site for professional and enthusiast programmers.

2 Answers

Yes SQL Server will consume as much memory it can get, right click on the server instance in SSMS and select properties. Then click on the memory page and put a value in for the maximum server memory to restrict how much memory the server will take.

share|improve this answer
But with the same settings for memory in my personal computer it does not take all the memory unless query is being run. –  Robert Nov 21 '12 at 13:19
Are you using the AWE option that existed prior to 2012 on any of them ? –  Neoafter Nov 21 '12 at 13:22
Neoafter is right. Sql server uses memory and for other application like SSAS, where in properties is some percent which shows how many memory Analysis services can take. Probably and Users if there are any, then they connect to database or Analysis services are using memory. Sometimes then I work there is lag on server then I minimize the memory usage, but after work I set it almost to the maximum. –  Justin Nov 21 '12 at 13:47
add comment

To determine which queries are pulling objects into the buffer, use a server side trace or a tool like SQL Server Profiler. This will capture each query that is being ran on the database server, as it is being executed.

You didn't say which version of SQL Server, but if 2005 or higher, I'd strongly recommend reading Aaron Bertrands Determine SQL Server memory use by database and object post. The first query returns the databases which have objects in the buffer, and the number of pages and space they are consuming. Find the top database, and use the second query to determine which of the databases objects are taking up most of the buffer.

If you are on SQL Server 2008 or higher AND CPU is not a bottleneck AND you have memory pressure and can't get more memory added, I'd also review Edwin Sarmiento's Implementing Data Compression in SQL Server 2008. You may try data compression on a few of the top objects from the memory by object query. Compressed data takes up less space on both the storage substem and in the memory buffer, so you can fit more data pages in memory. When more data pages fit in memory, it reduces the number of reads from / writes to disk. As Edwin describes: "Data compression reduces the storage costs and increases query performance by reducing I/O and increasing buffer-hit rates." The tradeoff is a slightly higher CPU Utilization.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.