ITPub博客

首页 > 数据库 > SQL Server > shrink temp db without reboot mssqlserver

shrink temp db without reboot mssqlserver

原创 SQL Server 作者:o0yuki0o 时间:2017-04-12 18:57:42 0 删除 编辑
use tempdb


CHECKPOINT;
GO
DBCC DROPCLEANBUFFERS;
GO


DBCC FREEPROCCACHE;
GO


DBCC FREESYSTEMCACHE ('ALL');
GO


DBCC FREESESSIONCACHE;
GO


DBCC SHRINKFILE (TEMPDEV2, 1024);   --- New file size in MB
GO



https://sqlsunday.com/2013/08/11/shrinking-tempdb-without-restarting-sql-server/

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/16131092/viewspace-2137127/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 抓取最大的tmstmp
请登录后发表评论 登录
全部评论

注册时间:2014-02-26

  • 博文量
    90
  • 访问量
    75887