can i move MSSQL11.MSSQLSERVER from c:/ to d:/

  • I am running out of space on tembdb on c drive can I move MSSQL11.MSSQLSERVER from one drive to another drive

  • I'm not completely familiar with how you do it, as tempdb is a "system" database, but have you googled "moving tempdb SQL Server nnnn" where the nnnn is your SQL Server version? My search produced the following link for SQL Server 2012:

    http://technet.microsoft.com/en-us/library/ms345408.aspx

  • It is rather hard to move the installed folder from SQL to another location. But it is much easier to move one or more databases to another disk.

    In case of [tempdb] execute the commands below (change path to fit your needs) and restart the SQL service. After the restart you can delete the files from the original location.

    ALTER DATABASE [tempdb] MODIFY FILE (NAME = tempdev, FILENAME = 'D:\Tempdb\tempdb.mdf')

    ALTER DATABASE [tempdb] MODIFY FILE (NAME = templog, FILENAME = 'D:\Tempdb\templog.ldf')

    If you want to move file(s) from a user database follow these steps:

    1. set the database offline

    2. copy the data- and/or logfile(s) to the new location

    3. execute the ALTER DATABASE...MODIFY FILE... command for each file you have copied in the previous step

    4. set the database online

    4a. in case the database can not be brought online, execute step 3 using the original file location and proceed with step 4

    5. delete the original file(s) if step 4 succeeded

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • thank you and I will try

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply