| title | Repair a Failed SQL Server Installation |
|---|---|
| description | Follow these steps to repair an installation of SQL Server. |
| author | rwestMSFT |
| ms.author | randolphwest |
| ms.date | 12/17/2025 |
| ms.service | sql |
| ms.subservice | install |
| ms.topic | install-set-up-deploy |
| monikerRange | >=sql-server-2016 |
[!INCLUDE SQL Server -Windows Only]
Use the repair operation in the following scenarios:
-
Repair an instance of [!INCLUDE ssNoVersion] that becomes corrupted after a successful installation.
-
Repair an instance of [!INCLUDE ssNoVersion] if the upgrade operation is canceled or fails after the instance name is mapped to the newly upgraded instance.
-
If you see the following message in the summary log, you can repair the failed upgrade instance:
[!INCLUDE ssNoVersion] upgrade failed. To continue, investigate the reason for the failure, correct the problem, and then repair your installation.
-
If you see the following message in the summary log, you need to uninstall and reinstall [!INCLUDE ssNoVersion]. You can't repair the [!INCLUDE ssNoVersion] instance.
[!INCLUDE ssNoVersion] upgrade failed. To continue, investigate the reason for the failure, correct the problem.
-
Note
To repair [!INCLUDE ssexpress-md] edition, you need the offline installer. Run the [!INCLUDE ssexpress-md] edition installation and select the Download Media option. Use the downloaded executable to run [!INCLUDE ssnoversion-md] Setup in place of setup.exe.
When you repair an instance of [!INCLUDE ssNoVersion]:
- All missing or corrupt files are replaced.
- All missing or corrupt registry keys are replaced.
- All missing or invalid configuration values are set to default values.
Before you continue, for [!INCLUDE ssNoVersion] failover clusters, review the following important information:
-
Repair must be run on individual cluster nodes.
-
To repair a failover cluster node after a failed Prepare operation, use Remove node and then perform the Prepare step again. For more information, see Add or remove nodes in a failover cluster instance (Setup).
-
Launch the [!INCLUDE ssNoVersion] Setup program (
setup.exe) from [!INCLUDE ssNoVersion] installation media. -
After prerequisites and system verification, the Setup program displays the [!INCLUDE ssNoVersion] Installation Center page.
-
Select Maintenance in the left-hand navigation area, and then select Repair to start the repair operation.
[!TIP]
If you use the Start menu to launch the Installation Center, you need to provide the location of the installation media at this time. -
Setup support rule and file routines run to ensure that your system has prerequisites installed and that the computer passes Setup validation rules. Select OK or Install to continue.
-
On the Select Instance page, select the instance to repair, and then select Next to continue.
-
The repair rules run to validate the operation. To continue, select Next.
-
The Ready to Repair page indicates that the operation is ready to proceed. To continue, select Repair.
-
The Repair Progress page shows the status of the repair operation. The Complete page indicates that the operation is finished.
Run the following command at a command prompt. Replace <instancename> with the name of the instance you want to repair.
setup.exe /q /ACTION=Repair /INSTANCENAME=<instancename>