SQL Server 缓存清理的一些原因

时间:2021-11-25 19:28:45

1、dbcc freeproccache;

2、dbcc freesystemcache('all') | dbcc freesystemcache('pool_name');

3、declare @dbid as int = DB_ID('studio'); dbcc flushprocindb(@dbid);

4、断开数据库的连接

5、打开或关闭 auto_close

6、使用下列命令

  alter database .... collation

  alter database .... modify name

  alter database .... modify filegroup

  alter database .... set online

  alter database .... set offline

  alter database .... set emergency

  alter database .... set read_only

  alter database .... set read_write

7、删除数据库