--DON'T DO THIS UNLESS WITH GOOD REASON
-- check db size
SELECT name, size FROM sys.master_files WHERE database_id = DB_ID(N'tempdb');
--How to shrink tempdb using DBCC
DBCC SHRINKDATABASE(tempdb, 10);
DBCC SHRINKFILE(tempdev, 5);
--How to shrink tempdb using ALTER DATABASE
USE master;
GO
ALTER DATABASE tempdb
MODIFY FILE (NAME = tempdev, SIZE=100Mb);
GO
ALTER DATABASE tempdb
MODIFY FILE (NAME = templog, SIZE=100Mb);
GO
No comments:
Post a Comment