Tempdb

  • How to move tempdb from c drive to e drive. I cannot deatach this? is there any other way or script?

    Nita

     

  • Hi,

    All you need to do is ...

    USE master;
    GO
    ALTER DATABASE tempdb MODIFY FILE (NAME = tempdev, FILENAME = 'E:\SQLData\tempdb.mdf');
    GO
    ALTER DATABASE tempdb MODIFY FILE (NAME = templog, FILENAME = 'F:\SQLLog\templog.ldf');
    GO
    ... Just change the filename to what ever locations you want.
    Then restart your SQL environment and everything will be happy.
    Regards,
    Ian.
  • Thanks it worked

    Excellent

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply