SQL Configure Temp DB

SQL Configure Temp DB

Purpose: Configure TempDB on a SQL Server


  1. Find the number of processors available to SQL Server on the server.
  2. Download the attached script
  3. Remove the alter database statements such that the number of mdf and ndf files will be equal to the number of processors noted in the first step.
  4. Update the location of the ndf files being added to be consistent with the location of the existing tempdb mdf file.
  5. Run the script
  6. Re-start the SQL Server service.  This is necessary for the rename of the original logical file name to take effect.

Download Script

Leave a Reply