Most of us must have encountered this problem when tempdb data file has grown and the disk is almost full.You can follow below steps.
1.It may be possible that by the time you have logged in into the server,those temporary objects or the queries which caused data file to grown are gone.You can try to shrink the tempdb data file by using below query.
USE [tempdb] GO DBCC SHRINKFILE (N'tempdev' , 500) GO
where ‘tempdev’ is logical data file name . ‘500’ (in MB ) is the target file size and you can change its value as per your environment.
2.If it’s a TEST environment and you are not able to shrink the file you can run below query :
Use tempdb GO DBCC FREEPROCCACHE -- clean cache DBCC DROPCLEANBUFFERS -- clean buffers DBCC FREESYSTEMCACHE ('ALL') -- clean system cache DBCC FREESESSIONCACHE -- clean session cache
and then try to shrink the tempdb data file
3.If it’s a production environment and you are not able to shrink the data file ,check for the