Repair/Remove/Install processes for SQL Server 2012 Express get stuck or hung
Asked Answered
C

7

15

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 trying to repair the instance, the repair process seemed to be stuck at the SqlEngineConfigAction_repair_validation_Cpu64 step.
It was at that step for a long time with no noticeable CPU usage, so I finally cancelled the repair process.

When trying to remove the instance, the uninstall process seemed to hang at the SqlEngineConfigAction_remove_validation_Cpu64 step.

When trying to install a 2nd instance, the install process seemed to hang at the SqlEngineDBStartConfigAction_install_configrc_Cpu64 step.

For some of the attempts, the SQL Server services were not manually stopped beforehand. For other attempts, the services were manually stopped, and changed from "Automatic" to "Manual".

Symptoms of the database corruption, in case this helps:
"SQL Server (SQLEXPRESS)" service has a status of "Started" on system reboot, but gets stuck in "Starting" status when the service is manually restarted using the Restart option.

When the service is manually stopped and then started, it displays this error:

Windows could not start the SQL Server (SQLEXPRESS) service on Local Computer. Error 1053: The service did not respond to the start or control request in a timely fashion.

SSMS (SQL Server Management Studio) fails to connect to the instance. It either tries forever with no timeout or error displayed, or it displays this error:

A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - The wait operation timed out.)(Microsoft SQL Server, Error: 258)

EDIT: I'm guessing the down-vote was because this was not stated in the form of a question. So to clarify, the question is how to resolve the issue of the Repair, Remove, or Install process hanging?

EDIT2: As a followup, it turns out the root cause of the corruption was shutting down the Windows 7 PC without first explicitly stopping the SQL Server services, even though SQL Server Express was not actively being used at the time.

EDIT3: Issue seems to have been resolved in SQL Server 2014 Express.

Coenzyme answered 1/2, 2015 at 19:6 Comment(0)
C
11

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". [You can change these service properties in the "Task Manager" app under the tab called, "Services". On the Services described above you can right click and then select properties. In the properties you can change from manual to automatic]
  • 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.

Coenzyme answered 1/2, 2015 at 19:27 Comment(4)
I had this problem with SQL Server 2014. For me it helped changing the services startup type to Disabled while the SQL Server uninstallation process was running, it would continue shortly after.Thynne
Hi, how did you solve this step? When trying to install a 2nd instance, the install process seemed to hang at the SqlEngineDBStartConfigAction_install_configrc_Cpu64 step.. Your solution to uninstall works for me, but I got the same problem as yours when I install it again.Custos
@YusrilMaulidanRaji I didn't encounter the issue you are seeing. When trying to install a 2nd instance.. was referring to trying to install a 2nd database instance within the existing SQL Server 2012 Express without re-installing SQL Server itself first.Coenzyme
Ran into this problem with SQL 2019, and I had to do a mix of both Solution 1 and Solution 2 steps. In services I set everything SQL to manual and ran a repair. Once the repair finished, I immediately ran uninstall and had no issues.Ferryboat
B
4

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:

  • Start the SQL server service in recovery mode: NET START MSSQL$SQLEXPRESS /f /T3608
  • Connect to server: SQLCMD -S .\SQLEXPRESS
  • List the files referenced in system table: SELECT name, physical_name, state_desc FROM sys.master_files ORDER BY database_id; (go)
  • Wherever the file path points to something invalid (like a missing drive), adjust it, using this: 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)
  • Exit sql server (exit)
  • Shut down the service NET STOP MSSQL$SQLEXPRESS
Bremerhaven answered 17/10, 2016 at 8:11 Comment(1)
It gets to the point where you just have to say no SQLServer installs on a box you are not prepared to Nuke. There needs to be a SQLServer removal tool, perhaps they could hire someone from Symantec to help with that.Lennyleno
G
2

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:

  1. Start menu -> View Local Service -> SQLSERVER(YOUR INSTANCE NAME) -> Properties -> Set Startup Type to disabled. Note: Service was stuck at starting.
  2. Restart the computer.
  3. Check the local service again. Now SQL Server Service will not be at the starting state.
  4. Now again uninstall the SQL server.

Hope it works.

Gast answered 6/5, 2020 at 15:8 Comment(0)
W
1

Try sbEnable=1

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.

Waldman answered 24/1, 2020 at 17:47 Comment(0)
C
1

I found just stopping the SQL Server background process from Task Manager to unblock it. It seemed that the SQL Server instance was having trouble stopping in Services.msc

Crappie answered 25/9, 2020 at 7:1 Comment(0)
L
0

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:

  1. I had executed the setup.exe /Action=Uninstall from cmd (Run as Administrator) in the mounted iso folder.
  2. Also Please restart after the other entries uninstallation. so that all the SQL services are stopped.
  3. Make sure all the SQL server services are either stopped or disabled before the restart.

Loaning answered 11/10, 2019 at 5:25 Comment(0)
A
0

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/

Affect answered 8/12, 2019 at 3:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.