SQL Server, SSIS, powershell
USE tempdb GO --sp_helpfile DBCC FREEPROCCACHE GO DBCC DROPCLEANBUFFERS go DBCC FREESYSTEMCACHE ('ALL') GO DBCC FREESESSIONCACHE GO --second parameter is targe in percent DBCC SHRINKDATABASE(tempdb,10)