I have 1 tempdb mdf file, and 7 ndf files. They all grew to 63 GB, and filled up the 500 GBdrive (the .mdf and .ndf files say 99% free space.).
I ran sp_who2 'Active' and there is no active transaction using tempdb. Why can't I release space?
I cannot restart this server till Friday, which is our designated maintenance window. What should I do until then?
Update
So I got permission to reboot the server. However it did not free up the space…tempdb files are still big. What do I do?
Best Answer
To be clear, the files won't "shrink" back to their previous size on their own while the system is running. They should go back to their configured size after a reboot (since tempdb is recreated when the database engine starts up).
You can check the configured size vs. actual size using these queries from Andy Mallon's blog:
The values from
sys.master_files
are the ones that tempdb should return to after a reboot. If those values have increased to 63 GB, then someone has configured them that way.If you choose the shrink the files, be sure to heed Andy's suggestion:
Once you have the immediate size problem addressed, you really need to: