Tuesday, October 6, 2026
  • Blog
  • Disclaimer
  • Home 1
  • Home 2
  • Privacy Policy
  • Terms and Conditions
  • Write for us
Advertisement
  • Business
  • LIFESTYLE
  • Travel
  • Health
  • Fashion
  • TECHNOLOGY
  • Entertainment
  • home improvement
  • Lifestyle
No Result
View All Result
  • Business
  • LIFESTYLE
  • Travel
  • Health
  • Fashion
  • TECHNOLOGY
  • Entertainment
  • home improvement
  • Lifestyle
No Result
View All Result
No Result
View All Result
Home TECHNOLOGY

How to Move TempDB to New Drive in SQL Server

thefeednewz by thefeednewz
July 22, 2022
in TECHNOLOGY
417 8
0
How to Move TempDB to New Drive in SQL Server
589
SHARES
3.3k
VIEWS
Share on FacebookShare on Twitter

In this article, we will show you, How to move TempDB to a new drive or location in SQL Server with an example.

TempDB is a very important system database in SQL Server. It holds the global and temporary user data. Whenever we create any table with a temporary keyword, that also table will store inside the TempDB only. So, it is highly recommended to place the TempDB on separate disk drives from other user databases for performance reasons. Because if multiple users are connected to the SQL Server instance then each user session may generate its own temp table which can also lead to excessive I/O operations on a single disk drive and severely degrade the performance of the SQL Server instance. If a heavily used user database is placed on the same drive where tempdb resides, then also it will further degrade the performance of the SQL Server instance. So, we should always place the tempdb on a separate disk drive from other user databases for optimal performance of SQL Server instance. Check RemoteDBA.

There are multiple ways to move TempDB to a new location or disk drives in SQL Server such as:

  • Using the SSMS GUI option
  • By using T-SQL Script
  • Let us see each option one by one in detail with examples.
  • Move TempDB to New Location or Drive Using SSMS 

This is the recommended and easier method to move TembDB to a new location. Follow the below steps to do so:

Step 1: Right-click on the server node and select Properties. It will open the Server Properties wizard window like the below screenshot.

You might also like

The Importance of Partnering with the Right Flange Suppliers for Long Term Success

Signs Your Business Needs a Website Redesign

Hostinger Coupon Code 2026: Save Big on Web Hosting with Verified Discounts

Step 2: In the Server Properties window, click on Database Settings from the left side pane and you can also see the current location of TempDB database files as shown below.

Step 3: Now click on Add button to add a new file for tempdb database. It will open Add Database File dialog box like the below screenshot.

Step 4: In the Add Database File dialog box, specify the new location for tempdb files and click on OK to continue.

In our example, we are moving TempDB files from the old location E:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\DATA to new location F:\SQLData\. You can choose any other desired location as per your environment and requirements.

Step 5: Once you click on the OK button in the previous step, it will open below Confirm File Relocation dialog box. Here you can see the old and new locations for TempDB files. Click on OK to continue.

Step 6: Now click on the OK button in the Server Properties window to close it.

From the above steps, we can see that it is very easy to move TempDB database files to a new location by using the SSMS GUI option. 

Move TempDB to New Location or Drive Using T-SQL Script 

This is another method to move tempdb database files from one location or disk drive to another. In this method we will use ALTER DATABASE command as shown below:

Check also – June wedding benefits

USE master;

GO

— To view the current location of tempdb files 

SELECT name, physical_name AS CurrentLocation

FROM sys.master_files

WHERE database_id = DB_ID(N’tempdb’);

GO

— To Change the location of tempdb data file (‘tempdev’) to new location 

ALTER DATABASE tempdb MODIFY FILE (NAME = tempdev, FILENAME = ‘D:\SQLData\tempdb.mdf’);

GO

— To Change the location of tempdb log file (‘templog’) to new location 

ALTER DATABASE tempdb MODIFY FILE (NAME = templog, FILENAME = ‘L:\SQLLog\templog.ldf’);

GO

In the above script, we are moving the tempdb data and log files from the old location to the new location D:\SQLData\ and L:\SQLLog\. You can choose any other desired location as per your environment and requirements. 

Conclusion:

That’s it! These are the two methods that you can use to move TempDB to a new location or disk drive in SQL Server. Moving TempDB to a separate disk drive is always recommended for performance reasons. I hope you enjoyed this article. Please post your feedback, questions, or comments below. 

Tags: SQL ServerTempDB
Previous Post

Keeping Cool While Working from Home This Summer

Next Post

5 Reasons to Get a Pre Approved Loan From Bajaj Finserv

thefeednewz

thefeednewz

Related Posts

TECHNOLOGY

The Importance of Partnering with the Right Flange Suppliers for Long Term Success

by hinesmarie
September 22, 2026
Signs Your Business Needs a Website Redesign
SOFTWARE

Signs Your Business Needs a Website Redesign

by hinesmarie
August 26, 2026
hostinger coupon code
TECHNOLOGY

Hostinger Coupon Code 2026: Save Big on Web Hosting with Verified Discounts

by hinesmarie
July 18, 2026
Managed Security Operations Center (SOC) vs In-House SOC: Choosing the Right Security Model for Your Business
TECHNOLOGY

Managed Security Operations Center (SOC) vs In-House SOC: Choosing the Right Security Model for Your Business

by hinesmarie
July 17, 2026
Social Media Trends That Will Matter in 2026
TECHNOLOGY

Social Media Trends That Will Matter in 2026

by hinesmarie
July 10, 2026
Next Post
Pre Approved Loan

5 Reasons to Get a Pre Approved Loan From Bajaj Finserv

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recommended

Why cardboard candy packaging is trending?

Why cardboard candy packaging is trending?

September 12, 2022

Mr Beast App Gambling

September 28, 2026

Categories

  • 0x0 0x0
  • ADVENTURE
  • anzn
  • Ashley Furniture
  • auroson
  • Business
  • Capitec
  • cashcrusaders
  • CONSTRUCTION
  • DIGITAL MARKETING
  • EDUCATION
  • Entertainment
  • Falcon
  • Fashion
  • filmy4web
  • filmy4web-in
  • Food
  • Health
  • home improvement
  • LIFESTYLE
  • Lifestyle
  • LottoStars
  • my5 activate
  • Online Earning game
  • pep home
  • pephome
  • Real Estate
  • salaah times cape town
  • sassa status check for r350 payment dates
  • SERVICE
  • simpcity
  • SKIN CARE
  • SOFTWARE
  • Sports
  • StripChat
  • TECHNOLOGY
  • This is the complete information about the sassa status check for r350 payment dates now here you can read this sassa status check for r350 payment dates
  • Travel
  • Trinidad Valentin
  • Uncategorized
  • World
  • WPC2027
  • xoli mfeka
  • yatto
  • yellowsubtrading

Don't miss it

EDUCATION

Beyond the Crime Scene: The Many Applications of BSc in Forensic Science

September 30, 2026

Top Online Pokies New Zealand

September 28, 2026

Freespins No Deposit

September 28, 2026

Play Roulette Game

September 28, 2026

Bounce Blitz Casino

September 28, 2026

Go Wild Casino 100 Free Spins Bonus 2026

September 28, 2026

Fab Swing

We bring you the newly breaking news that will in include news, technology, Travel, Lifestyle blogs etc.

Categories

  • 0x0 0x0
  • ADVENTURE
  • anzn
  • Ashley Furniture
  • auroson
  • Business
  • Capitec
  • cashcrusaders
  • CONSTRUCTION
  • DIGITAL MARKETING
  • EDUCATION
  • Entertainment
  • Falcon
  • Fashion
  • filmy4web
  • filmy4web-in
  • Food
  • Health
  • home improvement
  • LIFESTYLE
  • Lifestyle
  • LottoStars
  • my5 activate
  • Online Earning game
  • pep home
  • pephome
  • Real Estate
  • salaah times cape town
  • sassa status check for r350 payment dates
  • SERVICE
  • simpcity
  • SKIN CARE
  • SOFTWARE
  • Sports
  • StripChat
  • TECHNOLOGY
  • This is the complete information about the sassa status check for r350 payment dates now here you can read this sassa status check for r350 payment dates
  • Travel
  • Trinidad Valentin
  • Uncategorized
  • World
  • WPC2027
  • xoli mfeka
  • yatto
  • yellowsubtrading

Browse by Tag

American Visa application Bitcoin business business visa Cambodia Visa Canada canada visa Canada Visa Application Canadian Visa Champions League Citizens Cosmetics third party manufacturing Derma PCD Franchise Egypt Visa Explore Bali Harbolnas health Indian Visa Indian Visas Litecoin Market Stories Medical Visa New Zealand New Zealand visa PCD franchise PCD Pharma Franchise PCD pharma franchise Company PCD Pharma Franchise Company in India Pharma Franchise Pharma Franchise Company in India Saudi Arabia Saudi Visa third party manufacturing Third Party Pharma Manufacturing tourist visa Travel Turkey Visa Turkey Visa Application Turkish Visa United Stated USA visa Us Visa Vietnam Visa VISA

© 2022 Designed by Feed News

No Result
View All Result

© 2022 Designed by Feed News

Welcome Back!

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Fill the forms below to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In