- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All TopicsHi,
I am using CDatabase, CRecordset through ODBC to connect to SQL server 2000. When I tried to query the database for a large amount of records, I find that the SQL server takes up a lot of memory. The SQL server does not free the memory after CDatabase::Close or CRecordset::Close. It manages it own cache and after I restart the SQL service, the memory is then cleared. How do I allow the SQL server to free the memory once my query is done?
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: hemakumarPosted on 2005-08-25 at 06:25:41ID: 14751663
This is a database admin's work.But still I will tell u the problem.
The SQlServer doesnot release memory but rather goes on asking memory from the operating system as long as it provides.The better way to control is :-
From the enterprise manager Select SQLServer and right click go to properties.
Then U see a Tab Control-In that click memorytab.
In the memory Tab see two radio buttons at the top:-
1)With Dynamically configure SQlServer memory.which is default and in this option it does not release memory once it uses it and goes on querying.
2)Use FixedMemory radiobutton.select it and specify the memory and the sqlserver uses only that memory and releases the unused when required.
Hope this will help u.