SQL SERVER-修改TempDB路径

--查看tempdb文件信息
use tempdb
go
sp_helpfile
go

 


--修改路径
use master
go
Alter database tempdb modify file (name = tempdev, filename = ‘F:\TEMPDB\tempdb.mdf‘)
go
Alter database tempdb modify file (name = templog, filename = ‘F:\TEMPDB\templog.ldf‘)
go
Alter database tempdb modify file (name = temp2, filename = ‘F:\TEMPDB\tempdb_mssql_2.mdf‘)
go
Alter database tempdb modify file (name = temp3, filename = ‘F:\TEMPDB\tempdb_mssql_3.mdf‘)
go
Alter database tempdb modify file (name = temp4, filename = ‘F:\TEMPDB\tempdb_mssql_4.mdf‘)
go
Alter database tempdb modify file (name = temp5, filename = ‘F:\TEMPDB\tempdb_mssql_5.mdf‘)
go
Alter database tempdb modify file (name = temp6, filename = ‘F:\TEMPDB\tempdb_mssql_6.mdf‘)
go
Alter database tempdb modify file (name = temp7, filename = ‘F:\TEMPDB\tempdb_mssql_7.mdf‘)
go
Alter database tempdb modify file (name = temp8, filename = ‘F:\TEMPDB\tempdb_mssql_8.mdf‘)
go

 


--运行完上述命令后,还需要重启实例,方能生效。

SQL SERVER-修改TempDB路径

上一篇:windows批处理(cmd/bat)编程详解


下一篇:记录下oracle数据库转sqlserver数据库(二)