本文介绍了SQL Server 2012 Express的修复/删除/安装过程被卡住或挂起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SQL Server 2012 Express的实例因某种原因损坏.
我怀疑它在某种程度上与我使用Entity Framework有关,但是还没有证据.

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.

当尝试修复实例时,修复过程似乎停留在SqlEngineConfigAction_repair_validation_Cpu64步骤.
在那一步已经很长时间了,没有明显的CPU使用率,所以我最终取消了修复过程.

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.

当尝试删除实例时,卸载过程似乎挂在SqlEngineConfigAction_remove_validation_Cpu64步骤.

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

尝试安装第二个实例时,安装过程似乎挂在SqlEngineDBStartConfigAction_install_configrc_Cpu64步骤.

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

对于某些尝试,SQL Server服务是 not 事先手动停止的.对于其他尝试,服务被手动停止,并从自动"更改为手动".

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".

数据库损坏的症状,以防万一:
重新启动系统后,"SQL Server(SQLEXPRESS)"服务的状态为已启动",但是使用重新启动"选项手动重新启动该服务时,该服务将停留在正在启动"状态.

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:

SSMS(SQL Server Management Studio)无法连接到实例.它要么永远尝试,没有超时或显示错误,要么显示以下错误:

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:

我猜测投票否定是因为这不是以问题的形式陈述的.因此要澄清的是,问题是如何解决修复,删除或安装"进程挂起的问题?

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?

作为后续措施,即使当时未积极使用SQL Server Express,事实证明,损坏的根本原因是关闭Windows 7 PC而不首先显式停止SQL Server服务.

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.

问题似乎已在SQL Server 2014 Express中解决.

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

推荐答案

这对我有用.

解决方案1:
-停止"SQL Server(SQLEXPRESS)"& "SQL Server VSS编写器"服务 并将其启动类型设置为手动".
-重新启动PC.
-运行修复过程.
-将启动类型"更改回自动",然后重新启动服务.

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.

解决方案2:
-停止"SQL Server(SQLEXPRESS)"& "SQL Server VSS编写器"服务,并将其启动类型设置为"已禁用".
-重新启动PC.
-运行删除"过程以完全卸载SQL Server Express(实例+共享组件).
-重新启动PC.
-[可选]运行您喜欢的注册表清理器,例如CCleaner.
-安装SQL Server Express(除非您的目标只是卸载它).

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).

注意:在解决方案2中,我在第一台PC重新启动后尝试了修复"过程,但该过程卡在了SqlEngineConfigAction_repair_validation_Cpu64步骤中.

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.

这篇关于SQL Server 2012 Express的修复/删除/安装过程被卡住或挂起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-06 01:45