sqlserver释放内存


create procedure sp_clearmem
as
begin
dbcc freeproccache
dbcc freesessioncache
dbcc freesystemcache('all')
dbcc dropcleanbuffers

exec sp_configure 'max server memory',256
exec('reconfigure')
waitfor delay '00:00:05'
exec sp_configure 'max server memory',2147483647
exec('reconfigure')
end

posted @ 2013-12-17 14:04  kuailewangzi1212  阅读(188)  评论(0编辑  收藏  举报