SQL Server: Shrink tempdb

There was 50 GB space consumed in tempdb database. I wanted to shrink the database and clear space in my drive. below script will accomplish the task.
USE tempdb
dbcc shrinkfile (tempdev, 10)

For more info:
https://sqlsunday.com/2013/08/11/shrinking-tempdb-without-restarting-sql-server/
https://support.microsoft.com/en-in/kb/307487
http://dba.stackexchange.com/questions/78383/best-practice-to-shrink-tempdb-in-a-production-environment

No comments:

Post a Comment