USE master; GO /* SELECT * FROM sys.master_files WHERE database_id = DB_ID(N'tempdb'); */ ALTER DATABASE tempdb MODIFY FILE (NAME = tempdev, FILENAME = 'd:\tempdb.mdf'); GO ALTER DATABASE tempdb MODIFY FILE (NAME = templog, FILENAME = 'd:\templog.ldf')