How can release memory usage of sql server by command. my system have 16GB RAM, but when get huge query by sql server, memory usage become full. if I restart SQL Server service memory usage become free. but I want to release memory usage of sql server after each huge query execute.
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
SQL Server is supposed to use all the memory. If you want to reserve memory for other things set the max server memory setting in SQL Server so that it'll stop eating up all the memory.
SQL Server will always use as much as memory as he can gets. Even on a server which is designed just for SQL Server, you should define a max memory usage on the instance. Otherwise your windows can run in a memory pressure if you try to connect to the machine as admin.