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

前端 未结 7 1774
清歌不尽
清歌不尽 2021-01-02 05:16

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

7条回答
  •  遥遥无期
    2021-01-02 05:46

    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

提交回复
热议问题