Thursday 2 August 2012

How to Move SQL Server TempDB To A New Location


STEP 1. Collect the logical file names of the database through below command 
Select * From sys.master_files 
STEP 2.  Change the logical name and file location of the data and log files.
Alter DATABASE tempdb modify file(name='tempdev', filename = 'C:\MSSQL\DATA\tempdev.mdf')
Alter DATABASE tempdb modify file(name= 'templog', filename = 'C:\MSSQL\DATA\templog.ldf')
STEP 3.  And finally you need restart the server for update the changes.
How to move SQL Server databases to a new location. Moving the tempdb database. How to Move TempDB. How To Move TEMPDB Files. Moving the Tempdb and Master Database in SQL Server. TempDB is Full. Move TempDB from one drive to another drive. How to move TempDB to RAM in SQL Server 2005 or 2008 or 2012.

No comments:

Post a Comment