The short version:
If you get SqlEngineConfigAction_install_confignonrc_Cpu64 error while installing SQL Server 2008 R2 and the detail log says that the last successful command was mofcomp.exe then try restarting the server, uninstall the partially installed sql server and then reinstall.
- Check the log at C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\<datetime>\detail.txt
- If the last line in the log is something to do with mofcomp.exe then the steps below may help, otherwise unfortunately it’s probably something else.
- Open an Administrator command prompt and cd to “C:\Program Files\Microsoft SQL Server\MSSQL10_50.<InstanceName>\MSSQL\Binn”
- run “mofcomp.exe blah.mof” for each mof file in that folder
- If one of them fails then you know where the SQL Setup is failing.
- Try rebooting the server and rerunning the mof command that failed.
- If successfull then uninstall sql server and then reinstall, problem solved.
- If not successfuly then at least you know you have a WMI issue, google how to repair the WMI and try that until you can get the mof settings stored in the repository. There is no point trying to install SQL again until you have got this working.
The full story on how I found and solved this issue:
I ran across a problem installing SQL Server 2008 R2 Express with Advanced Services on a customers server this week. The server was a Windows Small Business Server 2008 SP2 with all windows updates applied.
I’d actually started to do the install at 11:00pm at night as I do this pretty much every day and have everything setup to install from a batch file with a sqlconfigurationfile, this way I could get straight to work in the morning (haha little did I know this day would be a write off) I kicked it off and went to bed only to wake up to find it still installing, stuck at SqlEngineConfigAction_install_confignonrc_Cpu64. I’m glad I did this overnight otherwise I would have most likely spent a couple of hours looking at this installing… wondering why it was taking so long.
I had no choice but to kill the install and check out the logs. Now killing it was trickier than you’d think. Killing setup100.exe did nothing… I ended up downloading processes explorer from sysinternals and finding setup100.exe had started running mofcomp.exe, killing mofcomp.exe then allowed setup100.exe to fail.
SQL Setup gave the following error:
TITLE: Microsoft SQL Server 2008 R2 Setup ------------------------------ The following error has occurred: The MOF compiler could not connect with the WMI server. This is either because of a semantic error such as an incompatibility with the existing WMI repository or an actual error such as the failure of the WMI server to start. For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=10.50.1600.1&EvtType=0xA60E3551%25400xD3BEBD98%25401211%25401 ------------------------------ BUTTONS: OK
That web page as of today says sorry we don’t know what the issue it.
Unfortunately as it had hung the logs didn’t actually say what it had failed on specifically. All I could see was the last thing in the install that had worked. The last few line of the detail.txt log are below:
2011-06-09 23:29:41 Slp: PerfCounter calling lodctr: 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008\MSSQL\Binn\perf-MSSQL$SQL2008sqlctr.ini' 2011-06-09 23:29:41 SQLEngine: : Checking Engine checkpoint 'XEventMofFile' 2011-06-09 23:29:41 Slp: Sco: Attempting to set file full path to 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008\MSSQL\Binn\xesqlpkg.mof' 2011-06-09 23:29:41 Slp: Sco: Attempting to normalize directory path 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008\MSSQL\Binn\xesqlpkg.mof' 2011-06-09 23:29:41 Slp: Sco: Attempting to check if file 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008\MSSQL\Binn\xesqlpkg.mof' exists 2011-06-09 23:29:41 SQLEngine: : Checking Engine checkpoint 'XEventCompileMofFile' 2011-06-09 23:29:41 SQLEngine: --XEventSetup: Compling MOF file: C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008\MSSQL\Binn\xesqlpkg.mof 2011-06-09 23:29:41 Slp: Sco: Attempting to install MOF file 2011-06-09 23:29:41 Slp: Running: C:\Windows\system32\WBEM\mofcomp.exe "C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008\MSSQL\Binn\xesqlpkg.mof" 2011-06-09 23:29:41 Slp: Microsoft (R) MOF Compiler Version 6.0.6000.16386 2011-06-09 23:29:41 Slp: Copyright (c) Microsoft Corp. 1997-2006. All rights reserved. 2011-06-09 23:29:41 Slp: Parsing MOF file: C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008\MSSQL\Binn\xesqlpkg.mof 2011-06-09 23:29:42 Slp: MOF file has been successfully parsed 2011-06-09 23:29:42 Slp: Storing data in the repository...
Through a lot of googling I found out that mofcomp.exe deals with WMI and specifically is used to add security groups for SQL Server. Everytime mofcomp is mentioned with SQL Server on google it seems the problem is WMI is corrupt, there are a few commands you can run to check it and you can also run wmidiag to check it is all working. All these tests I ran said it was fine. Despite this solutions kept saying stop the service, delete the WMI repository folder and restore it. I didn’t particularly want to go down the route of repairing this as it’s a customers server and their IT should really do this, especially if it has the chance to go wrong, which this definitely sounded like it did.
Lets dig deeper…
I decided to run process monitor on the install filtering on mofcomp.exe.
But first to perform the install again I first had to go to add remove programs and uninstall all the bits that had failed to install (everything except management studio). Only then can you reinstall, repair didn’t work I tried that first.
Process monitor showed that mofcomp.exe trying to run this command:
I opened an Administrator Command Prompt at:
C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008\MSSQL\Binn
This resulted in it hanging. Excellent, I now had a way to check if I’d fixed the issue without unsinstalling sql server and then rerunning through the full install which can take an hour or so.
I tried running lots of fixes to WMI found via google, but none of them worked. I tried one which suggested stop and restart the WMI service. I gave it a go, but this resulted in the service getting stuck in the “stopping” state. Fantastic… The only solution now is to restart the service. Well as this was a small business server restarting the server would stop the office from working, so I left this till after hours to restart. It turned out this was a blessing, as restarting the server fixed the issue immediately. I reran the mofcomp.exe command and it stored the data in the repository. I uninstalled and reinstalled and SQL installed perfectly.