• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1366
  • Last Modified:

How to change SQL Server Tempdb initial size?

I need to change Tempdb intial size from 8 mb to 200 mb and 10%  unlimted auto growth using script. Please send me the script. And also let me know do i need to restart the sql server services to update this changes.Thanks.
2 Solutions
Here are some excellent articles.

Minimize the size of tempdb in SQL Server

How to shrink the tempdb database in SQL Server

Tempdb Configuration Best Practices in SQL Server
Anoo S PillaiCommented:
The following script would help you to achiive the task
Execute the below script and restart the Sql server service. Please replace the file parh with the relevent path in your instence. I assume that you are asking only to resize your TempDB datafile. If you need to resize your log file append the sctipt with the log file settings.

use master
alter database tempdb
modify file (name = tempdev, filename = '<File Path>\tempdb.mdf',
size = 200 ,FILEGROWTH = 10%)

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now