Chomping At The Bits

TempDB on the Move

By default, your tempDB files are in the following locations:
C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDatatempdb.mdf
C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDatatempdb.ldf

The below commands will change the default tempDB locations for SQL Server
and have it create the tempDB files there upon start up.
USE master
ALTER DATABASE tempdb MODIFY FILE (NAME = tempdev, FILENAME = ‘E:Datatempdb.mdf’)
ALTER DATABASE tempdb MODIFY FILE (NAME = templog, FILENAME = ‘F:Logtemplog.ldf’)
You will need to restart SQL Server for tempdb’s file to actually move.

More reading on the topic: