日期:2014-05-19  浏览次数:20752 次

如何让SQLSERVER自动释放内存?
如何让SQLSERVER自动释放内存?

------解决方案--------------------
2000里面除了dbcc unpintable好像就没有了 而且这个操作也不会立即释放表内存Buffer

(DBCC UNPINTABLE does not cause the table to be immediately flushed from the data cache. It specifies that all of the pages for the table in the buffer cache can be flushed if space is needed to read in a new page from disk.)

2005/2008让DBA能够更自由的对SQL所占用的内存空间做处理 如

CHECKPOINT
DBCC DROPCLEANBUFFERS 
DBCC FREEPROCCACHE 

等分别可以回写脏页、去除查询缓存、去除存储过程缓存等 还可以sp_cursor_list查看全部游标 DBCC OPENTRAN查看数据库打开事务状态等