1

Okay, I wasn't sure whether to ask this here or on Server Fault, but the FAQ for DBA says it includes db configuration, so I'm going with here.

I'm installing Sql Server Express 2012 on a clean Windows Server 2012 box.

The install seems to go fine right up till the very end.

I left the program install directory at C:\Program Files....
I changed the instance root directory to D:\SQLE2012ROOT\.

Install chugs along happily, and when it ends, it says setup completed, but encountered the following error:

Feature:              Database Engine Services
Status:               Failed: see logs for details
Reason for failure:   An error occurred during the setup process of the feature.
Next Step:            Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Component name:       SQL Server Database Engine Services Instance Features
Component error code: 0x851A001A
Error description:    Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.

(it also gives a URL to go to, but clicking it just takes you to a Microsoft home page that shows consumer products to buy, like Surface and XBox. Thanks MS!)

The SQL service in Service Manager is stopped, and if you try to start it, chokes with message about service-specific error code 945, which googling, says it means Sql Server cannot find the necessary files.

Looking in the Event Logs after trying to start the service shows these two errors (each shows twice, once for MSDBData.mdf and once for model.mdf):

FileMgr::StartLogFiles: Operating system error 2(The system cannot find the file specified.) occurred while creating or opening file 'e:\sql11_main_t.obj.x86release\sql\mkmastr\databases\objfre\i386\modellog.ldf'. Diagnose and correct the operating system error, and retry the operation.  

and

FCB::Open failed: Could not open file e:\sql11_main_t.obj.x86release\sql\mkmastr\databases\objfre\i386\MSDBData.mdf for file number 1. OS error: 21 (The device is not ready.).

It would make sense that it cannot find those files, as the E: is an optical drive on the server, with no media mounted in it.

The million dollar question though is WHY it is looking for the files in that location? I've checked, and the setup DID actually create the files in the correct location under my specified instance root (D:\SQLE2012ROOT\MSSQL11.SQLE2012\MSSQL\DATA). But for some unknown reason, Sql Server is LOOKING for them under what looks like a development project build directory off the E: drive.

I looked in the registry and grepped on the C: to see if I could find where it was pointing to this wrong directory and simply re-point it, but I couldn't find anywhere where it pointed to that location.

I've already uninstalled once, and reinstalled from scratch again, and it did the same thing. The install file used was the 64 bit one that includes Management Studio, SQLEXPRWT_x64_ENU.


I've tried a number of things now, and could not get the 2012 to install. So I figured maybe just go to 2016 and see if that works. It installed but again had the same error as before, about Waiting on the Database Recovery handle. After setup concluded, I tried to start the service manually, and got the same errors in the event log about being unable to locate the MSDBDATA and MODEL files, though it has a different wrong path this time. Now it is attempting to look for those files in the directory D:\B\S2\Sources.obj.x86Release\sql\mkmastr\databases\mkmastr.proj\. I checked the startup parameters for the service in Sql Server Configuration Manager...

enter image description here

The file paths listed in the startup parameters ARE CORRECT.
I have no idea why it is looking for the files in this other wonky D:\B\S2... directory.

  • SQL Server was previously installed, probably through something like Microsoft Office, that failed. – Randolph West Aug 8 '16 at 21:59
  • All the setup log files for SQL 2005+ are stored in C:\Program Files\Microsoft SQL Server\xxx\Setup Bootstrap\Log with xxx being 110 in this case. Go there and each run of the Setup program will store everything in a timestamped directory. You might find further information about what happened in those logs. – Cody Konior Aug 9 '16 at 0:50
0

I think you are trying to start instance from a failed installation. Un installing and reinstalling SQL Server may clear this error.

Please look into below link which deals with similar issue.

https://connect.microsoft.com/SQLServer/feedback/details/684859/during-install-set-the-default-location-of-databases-problem

  • There is only one service. Note that the service descriptions show the name of the Sql Instance, and the name shown matches the one I entered for my named instance. I'm not sure that link will help as it talks about running sql commands, but I can't even start up the instance. The only thing I see there that I might be able to try is something about doing a rebuild, which I'll check out when I can get back on the server. – eidylon Aug 9 '16 at 15:13
  • Nope; can't even start the SQLCMD command line as per the linked articles to try to rebuild the dbs. – eidylon Aug 9 '16 at 19:06
0

FINALLY tracked this thing down after digging through more logs and finding some other errors.

In order to get it running again, I had to follow these steps...

  • launch Sql Server Configuration Manager
  • Right click SQL Server (INSTANCE), click properties
  • On the Log On tab, click Built-in Account
  • Select Network Service
  • Click OK to close and apply the changes.

After completing those steps, I was able to start the service. However, I still was not able to log in, it always told me 'invalid login'.

So I uninstalled and reinstalled once again, but this time I changed the service accounts during setup, all from the default NT Service\<something> to the built-in NTAUTHORITY\LOCAL SERVICE or NTAUTHORITY\NETWORK SERVICE. Having changed these during setup, everything then worked fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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