核心思想就是转移这个临时库到其他盘
USE master
GO
ALTER DATABASE tempdb modify file (name = tempdev, filename ='NewDrive:\Path\tempdb.mdf')
GO
ALTER DATABASE tempdb modify file (name = templog, filename ='NewDrive:\Path\templog.ldf')
GO
转移后删除C盘下面的
tempdb.mdf和templog.ldf即可