I have a few bad reports that cause tempdb to fill until I run out of disk space (work tables, not user defined #tables). I have used these two commands after a checkpoint in the tempdb to clear it when shrink does not work. Is this a problem in a Production environment? If it only causes recompiles, I don't care, if it causes stack traces, data corruption, dead server or any major issue, then I do care.
Or perhaps someone knows of a better way to do this? I kill the SPID that is using tempdb, then shrink tempdb. The shrink command either never works or it shrinks a small amount of the tempdb, even when properties of tempdb show it is 99% unused space.
Thx,
rick_mc_806