Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. 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

SQL services wont start due to incorrect drive letter after windows restore

Had a server crash, was successfully able to reinstall windows and restore the server SQL and all the necessary services were already installed.

Only problem the windows drives letters are wrong. So the services are pointed to the incorrect drive letter. I cant change the services in reedit or change the drive letter in disk management. Is there a way to do a repair in SQL add remove programs to associate's the necessary services with the correct drive letter?

Here's a example of the services Path to executable I:\Program Files\Microsoft SQL Server\MSSQL.1\

only problem the actual drive letter is E:

Services that wont start SQL SERVER SQL SERVER AGENT SQL Server Analysis SQL Server Analysis Services SQL Server Integration Services SQL Server Reporting Services

share|improve this question

migrated from Jan 17 '13 at 22:23

This question came from our site for professional and enthusiast programmers.

Consider ask this on Server Fault – partlov Jan 17 '13 at 20:26
This question now exist on all three forums (DBA.SE, SO, and SF). I would say DBA.SE should be its resting place. – Shawn Melton Jan 17 '13 at 22:18
SQL Server doesn't contain only executables in Program Files. It also contains/uses registry keys that you are missing. If this is a reinstall of Windows, I completely agree with Remus, you need to reinstall SQL Server from scratch. Just keep your eyes on the database backups (or at least save the mdf and ldf files for all your databases) like it's your fortune. – Marian Feb 21 '13 at 13:08

I don't know about the other services, but for the main database service you can go into SQL Server Configuration Manager (start - all programs - microsoft sql server 2008 - configuration tools - sql server configuration manager) and change where the master database is located.

Right click SQL Server(MSSQLSERVER)[parens may be different for named instances] - properties. Go to the Advanced tab. In the startup parameters (make sure the service is off first), update it to where your master files are physically located, should look something like this for you:

-dE:\SQL\Databases\master.mdf;-ee:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Log\ERRORLOG;-lE:\SQL\Databases\mastlog.ldf

Once you've edited it to the correct locations hit apply and restart the service and see if it comes up.

share|improve this answer

At the very least, you need to change your drive letter back as in the original configuration. But if reinstalled (not repaired) Windows then you basically have a new machine and you must re-install SQL and everything else on it.

share|improve this answer
Remus, do you think creating mount points to the proper paths is an option in this case? – Ali Razeghi Jan 17 '13 at 22:53
No, it's not. SQL Server install is more than just copying files to E:\Program Files (or whatever path). – bojan Feb 21 '13 at 12:15

I assume you've restored entire partitions, but the partition drive letters are now wrong.

If SQL is looking for I: then you have three choices

a) Fix the drive letter of the partition that's now got the data. You said this is not an option. Is that because I: is already taken, or because something else is now looking for this data based on its new drive letter (E:)

b) Add an additional drive letter for the partition - nothing stops you referring to the same partition by more than one drive letter. This isn't an option if I: is already taken and you can't move that data from I:

c) Create a symbolic link on your new I: drive to point things back to what's now on E:. Start an elevated command prompt. Then type

cd "\Program Files\"
mklink /d "Microsoft SQL Server" "E:\Program Files\Microsoft SQL Server"

If you already have a Microsoft SQL Server folder on your new I: then change the mklink command to make the MSSQL.1 folder as the symlink rather than the Microsoft SQL Server folder.

share|improve this answer
Having reread Remus' answer, if you've reinstalled Windows and SQL Server then it's a new install. You can look up how to move the master database and then reattach your other DBs. The master database can change with SQL patch versions so you'd want to make sure you're patched up to the same level you were previously. – Ian Yates Jan 18 '13 at 5:24

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.