An instance of SQL Server 2012 Express became corrupted somehow.
I suspect it was related in some way to my use of Entity Framework, but have no proof yet.
When
In my case the reason for the uninstaller getting stuck at SqlEngineConfigAction_repair_validation_Cpu64
were invalid file paths in the SQL server's system tables.
To correct this, allowing uninstallation, this worked for me:
1) Set service to use local account (Start -> Local Services -> SQL-Server->Properties -> Log on -> Local System acccount)
2) Follow the steps here: https://social.technet.microsoft.com/wiki/contents/articles/31786.sql-server-not-starting-after-fresh-installation.aspx
3) Retry uninstalling.
In case the above link becomes unavailable, here's a short summary:
NET START MSSQL$SQLEXPRESS /f /T3608
SQLCMD -S .\SQLEXPRESS
SELECT name, physical_name, state_desc FROM sys.master_files ORDER BY database_id;
(go)ALTER DATABASE model MODIFY FILE ( NAME = modeldev, FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL13.SQLEXPRESS01\MSSQL\DATA\model.mdf');
(go)
Note that the files have different NAMEs and different extensions (.mdf, .ldf)NET STOP MSSQL$SQLEXPRESS
In custom installation, changing SQL Server Database Engine's Account Name to " NT AUTHORITY\SYSTEM" fixed this installation problem for SQL Server Express 2017.
For Details: http://woshub.com/sql-server-database-engine-startup-handle/
In my case, I was trying to uninstall an instance of SQL Server 2008 R2 which was stuck during installation at SqlEngineDBStartConfigAction_install_configrc_Cpu64 step. Uninstallation was getting stuck at SqlEngineConfigAction_remove_validation_Cpu64 step. What helped me was following these steps:
Hope it works.
I had two versions of SQL Server installed. After uninstalling one it froze on SqlEngineConfigAction_remove_validation_Cpu64. The solution that worked for me was just to run uninstall from media. I guess after uninstalling one version it messed up the uninstallation files; so the other uninstallation from control panel add remove froze. so I mounted the SQLServer iso and run from there
setup.exe /Action=Uninstall
Please remember to uninstall all other entries of SQL Server from Add/Remove programs (of course except the entry that is causing problem i.e. Microsoft SQL Server 2008 R2 (64-bit)).
FYI:
Here's what worked for me.
Solution 1:
- Stop the "SQL Server (SQLEXPRESS)" & "SQL Server VSS Writer" services
and set their Startup Type to "Manual".
- Restart the PC.
- Run the repair process.
- Change the Startup Type back to "Automatic" and restart the services.
Solution 2:
- Stop the "SQL Server (SQLEXPRESS)" & "SQL Server VSS Writer" services and set their Startup Type to "Disabled".
- Restart the PC.
- Run the Remove process to uninstall SQL Server Express entirely (instance + shared components).
- Restart the PC again.
- [Optional] Run your favorite registry cleaner such as CCleaner.
- Install SQL Server Express (unless your goal was just to uninstall it).
NOTE: In the Solution 2 scenario, I tried the Repair process after the 1st PC restart, but it got stuck at step SqlEngineConfigAction_repair_validation_Cpu64.
This advice from TechNet worked for me:
Following Registry-Key must be set to 1[...]:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\AppCompat\sbEnable = 1
In my case that registry directory did not exist at all. And the uninstall was STILL stuck at that location for several (less than 10) minutes. But eventually it continued and finished.