bjennings
asked on
Sql Server 2012 - Moving multiple tempdb files to a different Partition
Hello Everyone,
Our tempdb is made up of 16 different files. I need to move the tempdb to a different partition. I found the script below to move the tempdb, but I was not sure how to move all the multiple files. Should I add every file tempdev1, tempdev2, tempdev3...etc... to this script?
Thanks,
Bill
use master
go
Alter database tempdb modify file (name = tempdev, filename = 'F:\program files\microsoft SQL server\tempdb.mdf')
go
Alter database tempdb modify file (name = templog, filename = 'F:\program files\microsoft SQL server\templog.ldf')
go
Our tempdb is made up of 16 different files. I need to move the tempdb to a different partition. I found the script below to move the tempdb, but I was not sure how to move all the multiple files. Should I add every file tempdev1, tempdev2, tempdev3...etc... to this script?
Thanks,
Bill
use master
go
Alter database tempdb modify file (name = tempdev, filename = 'F:\program files\microsoft SQL server\tempdb.mdf')
go
Alter database tempdb modify file (name = templog, filename = 'F:\program files\microsoft SQL server\templog.ldf')
go
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you so much!
Btw, 16 is very likely too many tempdb data files. You need to review that as well.