SQL Server Installer says: MOF compiler could not connect with the WMI server.

kennr234 136 Reputation points
2020-08-28T14:33:51.853+00:00

Hello. I had to move (some of) my MS SQL Server 2019 install from C: to D: because of space. I ended up needing to reinstall it completely, but product will not reinstall for me. Below is the error message. I already checked the WMI and reset its repository. I also cleared registry keys and deleted on disk files to get a clean install, but no help. Any help is appreciated. Thank you.

Microsoft SQL Server 2019 Setup


The following error has occurred:

The MOF compiler could not connect with the WMI server. This is either because of a semantic error such as an incompatibility with the existing WMI repository or an actual error such as the failure of the WMI server to start.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,653 questions
0 comments No comments
{count} votes

Accepted answer
  1. kennr234 136 Reputation points
    2020-08-29T01:21:39.293+00:00

    There were several fragments from previous install attempts lodged in the windows registry. Once those fragments were removed from the registry (which took some time and effort), the program installed smoothly. Thanks to all who would have helped me. Thanks.

    4 people found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Rob Ainscough 76 Reputation points
    2022-06-10T20:21:35.763+00:00

    Same issue with me ... there is no real "answer" provided ... "removed fragments from the directory" ... errr, what fragments???? Registry is massive.

    Yet another "correct" answer that is NOT an answer nor a solution?

    Microsoft documents website if virtually useless, I have no idea why Microsoft spend the time and money to keep it going and those resource assigned to it???

    3 people found this answer helpful.

  2. sonali rathi 1 Reputation point
    2021-06-21T06:44:37.073+00:00

    There is incomplete uninstallation of SQL server and we are not able to install in SQL server in your PC due to below errors. • Database Engine services Failed • PerfLib 2.0 counter removal failed with exit code 2. • The MOF compiler could not connect with the WMI server.

    0 comments No comments