WMI related errors while connecting to SQL Server 2005/2008 Reporting Services


Here's a quick guide describing a few checks you could make if you encounter any WMI related errors while trying to connect to your SSRS instance either with Management Studio or with the Configuration Tool.


1. The most common cause for these type of issues is missing or incorrect registry keys in the SQL Server registry hive.


Solution:


 The keys to be checked are:


o HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server, InstalledInstances – this has to list all installed instances and make sure there are no additional instances that were possibly removed and also no missing entries.
o HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names – this key has subkeys for OLAP,RS and SQL which have to list correctly the installed instances
For example, on a machine with two RS instances, one 2005 and one 2008 named sql05 and sql08 we will have:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\RS,
Value 0
  Name:            SQL05
  Type:            REG_SZ
  Data:            MSSQL.3


Value 1
  Name:            SQL08
  Type:            REG_SZ
  Data:            MSRS10.SQL08
 


2. In some cases, after a failed or incomplete installation of a service pack, or some other situations, some WMI DLLs might not be registered correctly.


Solution:


Open a command prompt, navigate to %Windows%\System32\wbem and execute the command:


for /f %s in (‘dir /b *.dll’) do regsvr32 /s %s


This will register all the dlls in the folder.
-----------------


IF the problem still persists, in order to check that a WMI query can be done against your instance, do the following test:


Launch WBEMTEST.EXE with an account that has admin credentials on the RS machine. (Start/Run.../WBEMTEST)
Press the “Connect…” button.
Enter namespace \\{RS_MACHINE_NAME}\root\microsoft\sqlserver\reportserver
Press “Connect”
Press the “Query…” button.
Enter query “Select * from __namespace”.
Press the Apply button.
List should list all the RS instances on the remote machine.  For a default instance is should be “RS_MSSQLSERVER”.
Close this dialog and press the “Connect…” button again.
Append the name from the above query to the end of the namespace and the value “\vX\admin”, ie \\rsmachine\root\microsoft\sqlserver\reportserver\rs_mssqlserver\v10\admin
Press the connect button.
Press the “Enum Classes…” button.
Press the OK button without entering anything.
There should be a list box and the last entry should say “MSReportServer_ConfigurationSetting”, double click on it.
Press the “Instances…” button.
You should get a list of instances.  Choose the one that corresponds to the instance chosen in the above namespace query.
This should list properties and methods for the RS WMI provider. 


To get this far, the WMI services can communicate and the user has administrative privileges on the remote machine. The test has succeeded.


Alternatively, you could use a WMI test script. A tool that could help you create the scripts is WMI Code Creator ( http://www.microsoft.com/downloads/details.aspx?FamilyID=2cc30a64-ea15-4661-8da4-55bbc145c30e&DisplayLang=en )


And to perform a full diagnosis of the WMI Service, you could use WMI Diagnosis Utility (http://www.microsoft.com/technet/scriptcenter/topics/help/wmidiag.mspx)


 

Comments (0)

Skip to main content