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.
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.