On my dev box I have my SQL Server configured with a high maximum amount of memory (8GB of 16GB). This is required for many development tasks.
Sometimes I want my memory back, though. I don't want to leave 8GB consumed permanently.
What's a good way to get SQL Server to suddenly release all it's memory to the operating system?
DBCC DROPCLEANBUFFERS does not do that. It merely marks clean buffers as available.
Restarting SQL Server is a problem because this causes a 1 minute database recovery to be run due to this bug/feature: Stopping the SQL Server service causes databases to not shut down cleanly (please vote for that connect item; seems like an egregious bug).