first fire sp_helpfile to get the name and location of the files
use master
GO
sp_helpfile
ALTER DATABASE TEMPDB MODIFY FILE (
NAME = tempdev, FILENAME = 'E:\TEMPDB\tempdev.mdf'
)
ALTER DATABASE TEMPDB MODIFY FILE (
NAME = templog, FILENAME = 'E:\TEMPDB\templog.ldf'
)
It will only be reflected after SQL Server is restarted. Then you can delete those old tempdev.mdf and templod.ldf files to gain space.

0 Comments.