Q

How to flush memory occupied by queries in different sessions

How can we flush memory that was occupied by different queries running in different sessions, because in SQL Server

we find that if we close the session, it still occupies the server memory? I need some way to flush memory for different sessions. Awaiting your reply. Thanks in advance.

There is no "flush" of server memory. The SQL Server will allocate memory for itself as it needs to, up to a maximum amount so as not to impact the operation of the OS. If no other process requires memory, then SQL Server will not release that memory back to the system and will appear to have blocked it all off. For example, if you have a machine with 512 MB of RAM on it and the OS needs 50MB to run, SQL Server can use up to 462 MB of RAM. If you have a series of queries that demand the utilization of 462 MB of RAM, then SQL Server will allocate that much memory to its processes. If no other process on the machine needs memeory, then your SQL Server memory allocation will remain at 462 MB indefinitely. If some other process executes that needs, say, 40 MB of RAM, then you will see the memory allocation for SQL Server drop by 40 MB to 422 MB.

 

For More Information

This was first published in April 2001

Dig deeper on Microsoft SQL Server Installation

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchBusinessAnalytics

SearchDataCenter

SearchDataManagement

SearchAWS

SearchOracle

SearchContentManagement

SearchWindowsServer

Close