Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Lost drive where tempdb resides - need to move tempdb while sql services are not running Expand / Collapse
Author
Message
Posted Wednesday, December 29, 2010 9:13 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, December 3, 2014 12:22 PM
Points: 163, Visits: 611
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
Post #1040397
Posted Wednesday, December 29, 2010 9:23 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 4:32 AM
Points: 40,669, Visits: 37,131
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 2008, MVP
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

Post #1040402
Posted Wednesday, December 29, 2010 9:24 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 10:36 PM
Points: 3,118, Visits: 11,556
Look at this thread:
http://www.sqlservercentral.com/Forums/Topic724575-5-1.aspx
Post #1040405
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse