Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I can't start it and the log file reads:

 CREATE FILE encountered operating system error 21(failed to retrieve text for 
 this error. Reason: 15100) while attempting to open or create the physical file 
 'I:\MSSQL \TempDB\tempdb.mdf'.`

Server installed by default to
C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER

Why does it try to create temp DB on the I: drive? how can I change it?

share|improve this question

migrated from Apr 11 '11 at 16:54

This question came from our site for computer enthusiasts and power users.

Temporarily create an I:, and create folders on there to let it start. Then go into the properties of tempdb (using Management Studio) and change the file locations.

share|improve this answer
Yep - that's the good easier answer! Nice one! – Peter Schofield Apr 11 '11 at 17:56

It sounds like your initial install of mssql server was done to the I drive. I hope you didn't wipe it out... fixing it can be difficult. Here are few things to try...

1) If you don't have an I drive anymore, create one temporarily using subst:

subst i: c:\some-path-you-like

& try and start the server. Once you can get the server started, you can re-map the tempdb to a different directory by doing this:

use master
Alter database tempdb modify file (name = tempdev, filename = 'C:\Sqldata\tempdb.mdf')
Alter database tempdb modify file (name = templog, filename = 'C:\Sqldata\templog.ldf')

After this, you should be good-to-go. You can then remove the subst'd drive by doing this:

subst i: /D

It's also possible that your master database & log and error log are still on the I drive as well, and those can also be moved... but a little differently. You'll need to modify the mssql service startup-parameters to include 3 additional options:

-d is the fully qualified path for the master database data file.
-e is the fully qualified path for the error log file.
-l is the fully qualified path for the master database log`

i.e. -l c:\wherever\mastlog.ldf etc...

share|improve this answer

You could also try using the Trace Flag /T3608 and /f switch to start in minimal configuration with only the master database.

Some examples in the below links.

share|improve this answer

system error 21 means "The device is not ready". Look for I/O related errors in the System Event Log for the I drive.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.