We have a sql agent job that runs after daily processing; the job resets the memory allocated to sql server by changing the “maximum server memory” parameter. The memory is reset from 50 GB to 15 GB, then resets it back to 50 GB, after waiting for several minutes. The job has been in place for past several months. However, recently during its executions the sql server ran out of memory due to an increased processing load. Sql server became unresponsive until an admin has reset “maximum server memory” manually.
Upon research, I’ve found out, this was necessary and I’m told that sql server has trouble releasing the memory on its own.
I would like to know if there is a better way of managing sql server’s memory allocation or an alternative way to have sql server release memory without the possibility of causing a failure.
sql server version is 2008 R2 sp2 on windows 2008 R2 sp1