Friday, August 10, 2012

MSSQL: Move tempdb

1. Check where  is tempdb stored

USE tempdb
GO
EXEC sp_helpfile
GO

2. Change the folder

USE master
GO
ALTER DATABASE tempdb 
MODIFY FILE (NAME = tempdev, FILENAME = 'D:\VIP\tempdb.mdf')
GO
ALTER DATABASE tempdb 
MODIFY FILE (NAME = templog, FILENAME = 'D:\VIP\tempdb.ldf')
GO

3. Work / monitor tempdb

Read: http://technet.microsoft.com/en-us/library/cc966545.aspx#EDAA



Subscribe to RSS Feed Follow me on Twitter!