SQL Server tempdb 数据库位置迁移
--查看物理位置
SELECT
name, physical_name
FROM sys.master_files
WHERE database_id = DB_ID(‘tempdb‘);
--修改路径
ALTER DATABASE tempdb
MODIFY FILE (NAME = tempdev, FILENAME = ‘D:\DataBaseNew\tempdb.mdf‘);
ALTER DATABASE tempdb
MODIFY FILE (NAME = templog, FILENAME = ‘D:\DataBaseNew\templog.ldf‘);
--重启数据库
时间: 2024-10-08 12:33:17