use master
go
Alter database tempdb modify file (name = tempdev, filename = 'D:\Sqldata\tempdb.mdf')
go
Alter database tempdb modify file (name = templog, filename = 'D:\Sqldata\templog.ldf')
Go
Then stop and restart the SQL Server services. Every time the services are stopped and restarted, SQL Server 'rebuilds' the TEMPDB. That's when it will go to the new location.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.