Oct
1
This seems to happen all the time: somebody writes some bad SQL on our SQL Server box and all the sudden our tempdb grows to the point where it’s taking up an entire job.
Solution: create a job that checks the file size of tempdb. If it reaches a certain threshold, run the following command:
use tempdb
dbcc shrinkfile(tempdev,2048)
Best to run the job in off-hours, if you know what I mean.