In this article we will explain how to prepare Plan Of Action(POA) for TempDB file movement.
POA for TempDB file movement |
Implementation plan |
SL No | Steps |
1 | Take backup of all databases. |
2 | Take output of Tempdb database. Use Tempdb go sp_helpfile go |
3 | Execute the below script to move tempdb files from E drive to T drive USE master; GO ALTER DATABASE tempdb MODIFY FILE (NAME = tempdev, FILENAME = ‘T:\Datafiles\tempdb.mdf’); GO ALTER DATABASE tempdb MODIFY FILE (NAME = templog, FILENAME = ‘T:\Datafiles\templog.ldf’); GO |
4 | Restart SQL Server. |
5 | Check the database consistency. |
Roll Back plan |
SL No | Steps |
1 | Execute the below script to move tempdb from T drive to E drive USE master; GO ALTER DATABASE tempdb MODIFY FILE (NAME = tempdev, FILENAME = ‘E:\Datafiles\tempdb.mdf’); GO ALTER DATABASE tempdb MODIFY FILE (NAME = templog, FILENAME = ‘E:\Datafiles\templog.ldf’); GO |
2 | Restart SQL Server. |
3 | Check the database consistency. |