Process Recovery / Removal / Installation for SQL Server 2012 Express stuck or stuck

The instance of SQL Server 2012 Express is somehow corrupted.
I suspect this is somehow related to my use of the Entity Framework, but I have no evidence so far.

When trying to restore an instance, the recovery process stuck in step SqlEngineConfigAction_repair_validation_Cpu64.
It was at this stage for a long time without noticeable processor use, so I finally canceled the recovery process.

When you try to delete an instance, the uninstallation process freezes in step SqlEngineConfigAction_remove_validation_Cpu64.

When you try to install the second instance, the installation process freezes at step SqlEngineDBStartConfigAction_install_configrc_Cpu64.

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

Symptoms of database corruption if this helps:
The SQL Server (SQLEXPRESS) service has a status of Running when the system restarts, but gets stuck in the Start state when the service is manually restarted using the Restart option.

When the service stops and starts manually, it displays this error:

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

SSMS (SQL Server Management Studio) cannot connect to the instance. It either tries forever without a timeout or error, or displays this error:

The connection to the server was successfully established, but an error occurred while shaking hands before logging in. (provider: SSL provider, error: 0 - operation timed out.) (Microsoft SQL Server, error: 258)

EDIT: I assume there was a vote against because it was not indicated on the question form. Thus, to clarify, the question is how to solve the problem of the freezing of the recovery, uninstall or installation process?

EDIT 2: As a result, it turns out that the main cause of the damage was shutting down the Windows 7 computer without first shutting down SQL Server services, even though SQL Server Express was not actively used at that time.

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

+8
source share
3 answers

Here is what worked for me.

Solution 1:
- Stop the SQL Server Services (SQLEXPRESS) and SQL Server VSS Writer and set the Startup Guide to their startup type.
- Restart your computer.
- Start the repair process.
- Change the startup type to "Automatic" and restart the services.

Solution 2:
- Stop the SQL Server (SQLEXPRESS) and SQL Server VSS Writer services and set the Startup Type to Disabled .
- Restart your computer.
- Run the uninstall process to completely remove SQL Server Express (instances + common components).
- Restart your computer again.
- [Optional] Run your favorite registry cleaner, such as CCleaner.
- Install SQL Server Express (if only your goal is to simply remove it).

NOTE. In the Solution 2 script, I tried to restore the process after the first restart of the PC, but it got stuck in the SqlEngineConfigAction_repair_validation_Cpu64 step.

+8
source

In my case, the reason that the uninstaller got stuck in SqlEngineConfigAction_repair_validation_Cpu64 to invalid file paths in the SQL Server system tables.

To fix this by allowing deletion, this worked for me:

1) Setting the service to use the local account (Start β†’ Local Services β†’ SQL-Server-> Properties β†’ Login β†’ Local System Account)

2) Follow these steps: https://social.technet.microsoft.com/wiki/contents/articles/31786.sql-server-not-starting-after-fresh-installation.aspx

3) Reinstall.

In case the above link becomes unavailable, here is a short summary:

  • Start the SQL Server service in recovery mode: NET START MSSQL$SQLEXPRESS /f /T3608
  • Server Connection: SQLCMD -S .\SQLEXPRESS
  • List of files specified in the system table: SELECT name, physical_name, state_desc FROM sys.master_files ORDER BY database_id; (go)
  • If the file path indicates something invalid (for example, a missing drive), adjust it using the following: ALTER DATABASE model MODIFY FILE ( NAME = modeldev, FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL13.SQLEXPRESS01\MSSQL\DATA\model.mdf'); (go) Please note that the files have different NAMES and different extensions (.mdf, .ldf)
  • Quit SQL Server (Quit)
  • Turn off the NET STOP MSSQL$SQLEXPRESS
+1
source

I had two versions of SQL Server installed. After removal, it hung on SqlEngineConfigAction_remove_validation_Cpu64. The solution that worked for me was to simply start the removal from the media. I think after uninstalling one version it ruined the uninstall files; therefore, other deletions from the control panel add remove freeze. so I mounted SQLServer iso and started from there

 setup.exe /Action=Uninstall 

Remember to remove all other SQL Server entries from the Add or Remove Programs program (of course, except for the entry that causes the problem, that is, Microsoft SQL Server 2008 R2 (64-bit)).

For your information:

  1. I ran setup.exe / Action = Uninstall from cmd (Run as administrator) in the mounted iso folder.
  2. Also, please restart after deleting other entries. so all SQL services are stopped.
  3. Ensure that all SQL Server services are either stopped or disabled before restarting.

0
source

Source: https://habr.com/ru/post/981837/


All Articles