Archive

Archive for the ‘SQL Server’ Category

SQL Server : Change TempDB location

April 21st, 2011 No comments
This is no rocket science but today I needed to move the tempDB to another disk. This is something I though could be done by changing the location path on the database properties in the files tab. Well, bummer, the location was not editable there. So how can we do this… ?
Running this query will solve this for you :
USE
master;
GO
ALTER DATABASE tempdb
MODIFY FILE (NAME = tempdev, FILENAME = ‘F:MSSQLDatatempdb.mdf’);
GO
ALTER DATABASE tempdb
MODIFY FILE (NAME = templog, FILENAME = ‘F:MSSQLDatatemplog.ldf’);
GO