slantyyz

685 days ago

0

votes

SQL Server: Moving the tempdb

222 views

If you need to move the tempdb to another drive in SQL Server, use this SQL:

use master
go
Alter database tempdb modify file (name = tempdev, filename = 'E:\Sqldata\tempdb.mdf')
go
Alter database tempdb modify file (name = templog, filename = 'E:\Sqldata\templog.ldf')
Go

Don't forget to modify the paths according to your own server paths.

 

Comments

 

No answers have been submitted yet. Log In or Register to provide an answer.