• You can do it by running alter database statement. You can look at the script .that I’ve added as an example. Unfortunately you'll have to restart the service. Without restarting the service, tempdb will continue to work from its current position.

    use master

    go

    --Change the location of the data file. .

    Alter database tempdb modify file (name = tempdev, filename = 'D:\MyTempDBDir\tempdb.mdf')

    Go

    --Change the location of the log file.

    Alter database tempdb modify file (name = templog, filename = 'E:\TempDBLogDir\templog.ldf')

    go

    Don't forget to use the real path and not the path in this example.

    Adi

    --------------------------------------------------------------
    To know how to ask questions and increase the chances of getting asnwers:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/