Επεξεργασία

Κοινή χρήση μέσω


Repair a failed SQL Server installation

Applies to: SQL Server - Windows only

The repair operation can be used in the following scenarios:

  • Repair an instance of SQL Server that is corrupted after it was successfully installed.

  • Repair an instance of SQL Server 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:

      SQL Server 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 SQL Server. You can't repair the SQL Server instance.

      SQL Server upgrade failed. To continue, investigate the reason for the failure, correct the problem.

Note

These instructions don't apply to SQL Server Express edition.

When you repair an instance of SQL Server:

  • 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 SQL Server failover clusters, review the following important information:

Repair a failed installation of SQL Server from the Installation Center

  1. Launch the SQL Server Setup program (setup.exe) from SQL Server installation media.

  2. After prerequisites and system verification, the Setup program will display the SQL Server Installation Center page.

  3. Select Maintenance in the left-hand navigation area, and then select Repair to start the repair operation.

    Tip

    If the Installation Center was launched using the start menu, you need to provide the location of the installation media at this time.

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

  5. On the Select Instance page, select the instance to repair, and then select Next to continue.

  6. The repair rules run to validate the operation. To continue, select Next.

  7. The Ready to Repair page indicates that the operation is ready to proceed. To continue, select Repair.

  8. The Repair Progress page shows the status of the repair operation. The Complete page indicates that the operation is finished.

Repair a failed installation of SQL Server using the command prompt

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>