USE [master]
GO
ALTER DATABASE tempdb
MODIFY FILE(NAME='tempdev', FILENAME='E:\Microsoft SQL Server\MSSQL.1\MSSQL\Data\tempdb.mdf')
GO
ALTER DATABASE tempdb
MODIFY FILE(NAME='templog', FILENAME='F:\Microsoft SQL Server\MSSQL.1\MSSQL\Log\templog.ldf')
GO
After this: Restart SQL Server.
Effect: Moving the TempDB to a more powerful storage will increase performance, especially for OLTP systems.
Responses to “SQL Server: How to move tempdb?”