Moving the TempDB database to a new drive

Often you will need to add or move the tempDB data files, either to match the core count (up to 8 as best practice), or move them to an SSD or Flash card for performance. Below is a template script you can use. Just alter the drive letter, path and size to your standards and run. You will need to recycle the SQL services for the changes to take effect.

NOTE: Make sure you get all files names and paths correct or you will have issues when SQL Server cannot restart.

Views – 579