2

I got a WMI error from SQL Server Configuration Manager after I ran sp_dropserver and sp_addserver commands.

Various posts suggested I run the mofcomp command. I did this, and got the following errors. I did run it using administrator privileges, and we are on SQL Server 2008 R2, so "100" should be correct.

C:\Program Files (x86)\Microsoft SQL Server\100\Shared>mofcomp sqlmgmproviderxpsp2up.mof
Microsoft (R) MOF Compiler Version 6.2.9200.16398
Copyright (c) Microsoft Corp. 1997-2006. All rights reserved.
Parsing MOF file: sqlmgmproviderxpsp2up.mof
MOF file has been successfully parsed
Storing data in the repository...
An error occurred while opening the namespace for object 1 defined on lines 4 - 7:
Error Number: 0x80070422, Facility: Win32
Description: The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
Compiler returned error 0x80070422
C:\Program Files (x86)\Microsoft SQL Server\100\Shared>

Any assistance is much appreciated. I am stumped as to what to do next. The instance is up, but I cannot stop or restart it even from SSMS (options greyed out).

History of what happened, more details and error message as suggested.

SA "cloned" the entire box A to new box B (not actual names, of course). I was on box B and needed to change name of instance from A to B so that developers could connect to a "new" instance (B). Remember, this is a clone of A, so the instance name was A even though I was on the physical box B. Using SSMS, I connected to the database using name A, because that is what I saw as the server name in the connection box. OOPS! I was actually connected to instance A on box A, not B, but I did not know that at this time. I ran dropserver A, addserver B and then restarted instance (remember, I am on box B). The change did not appear (I now know why, the change happened on box A!).

Discovering my mistake, I go to box A and see that the instance name is now B (output of sp_helpserver). I run dropserver B, then addserver A to "fix" it (put it back to A), then I tried to run SQL Config Manager (as administrator) to "enable" the rename. That is when I get this error:

Cannot connect to WMI provider. You do not have permission or the server is unreachable. The service cannot be started because it is disabled or because it has no enabled devices attached to it. Error 0x80070422.

I tried to fix this using the mofcomp command I mentioned in original post. The error I got from that seems to match the error above when I run Config Manager.

When I now run sp_helpserver on A, I still see instance name as B. However, the SSMS connection box shows instance name as A, and it cannot connect to instance B (not found). The output of SELECT @@SERVERNAME AS 'Server Name'; is instance name A. So, there is a discrepancy between what @@SERVERNAME shows and what sp_helpserver shows.

1

I found the issue. The WMI service had been disabled (hence the error message). I used the properties menu (running as admin) from the services list, and put this service on auto start and then started it. Config Mgr came up.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.