Lost drive where tempdb resides - need to move tempdb while sql services are not running

  • Hi -

    I had tempdb sitting on the E: drive. It was the only database on the E: drive and we actually lost the E: drive.

    I need to move tempdb to a different drive (F:\Tempdb) but SQL services are offline.

    Is it possible to move tempdb while SQL Services are not running?

    Any information is greatly appreciated.

    Matt

  • No, you'll need to start SQL in it's minimal config mode, then run the ALTER DATABASE to change the tempDB location

    Start SQL from the command line with the following (I think this is right):

    sqlservr.exe -m -f -T3608

    With that, SQL will be started single user, minimal config. One connection can then be made (and only one), you can run the alter database to move tempDB, then restart SQL normally and it should start fine.

    Edit: added missing traceflag.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Look at this thread:

    http://www.sqlservercentral.com/Forums/Topic724575-5-1.aspx

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

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