Thursday, April 7, 2011

Change the path of TempDB in SQL Server 2005

Error : System databases master, model, msdb, and tempdb cannot be detached.
use master

go
Alter database tempdb modify file (name = tempdev, filename = 'D:\SQL Database 2005\tempdb.mdf')
go
Alter database tempdb modify file (name = templog, filename = 'D:\SQL Database 2005\templog.ldf')
go

No comments:

Post a Comment