Showing posts with label mofcomp. Show all posts
Showing posts with label mofcomp. Show all posts

Wednesday, 22 February 2017

SQL Server configuration manager is not opening

SQL server configuration manager relies on WMI provide. I found that the WMI provider failed to load with error 0x80080005 (Server execution failed).

I failed to rebuild wmi database.
wmiprvse /regserver     --> No entry point error
mofcomp hang

DCOM security issue or wmiprvse.exe failed to work.

Workaround:
1) Check DCOM permission.
2) Replace wmiprvse.exe with the one copied from good server.
C:\Windows\System32\wbem\wmiprvse.exe
3) Successfully rebuild the WMI database.
4) Then we re-compiled the SQL server WMI MOF file by using below command:
mofcomp "C:\Program Files\Microsoft SQL Server\90\Shared\sqlmgmproviderxpsp2up.mof"
5) Refer below updates if you encounter error while compiling.

After that, the SQL configuration manager opens successfully.

Updates: 

Recently encounter another issue while recompiling WMI MOF and it gave below error.










When I checked the consistency of WMI repository, it shows inconsistent.




As a workaround, I stopped the WMI service and salvage the WMI repository as below.








After that it shows me that it is consistent now, at this point recompilation of MOF works fine.
Note: This command (Winmgmt /salvagerepository) will take the content of the inconsistent repository and merge it into the rebuilt repository if it is readable.




If the above doesn’t work, then run:

Winmgmt /resetrepository

Reference:

https://blogs.technet.microsoft.com/askperf/2009/04/13/wmi-rebuilding-the-wmi-repository/