Microsoft KB Archive/835303

= Incomplete results when you query a Microsoft Operations Manager 2000 database =

Article ID: 835303

Article Last Modified on 12/4/2007

-

APPLIES TO


 * Microsoft Operations Manager 2000 Service Pack 1

-





SYMPTOMS
You may receive incomplete results when you use the query that is in the Microsoft Operations Manager (MOM) 2000 Software Development Kit (SDK) to query for computer groups to which a computer belongs.



CAUSE
This problem may occur if NULL values exist on the Included Computers tab or the Excluded Computers tab of the computer group properties. For example, you can create NULL values by following these steps:
 * 1) Start the MOM Administrator Console.
 * 2) Double-click Rules, and then click Computer Groups.
 * 3) Double-click Microsoft Operations Manager Agents.
 * 4) Click the Excluded Computers tab or the Included Computers tab.
 * 5) Click Add, and then click OK.

This saves blank values for and Domain and the Computer.

Note If you use the equal sign (=) as an evaluator when you add excluded or included computers, this problem may also occur.



WORKAROUND
To work around this problem, make sure that any NULL values are removed and that the equal sign (=) operator is not used for any Computer Group criteria. You can also query SQL directly to obtain the same information. Below is an example of a query that returns the computer groups to which a computer belongs, where  is the MOM Agent GUID that you want to search for: select CR.idComputerRule,CR.Name,CR.Description from ComputerRule CR INNER JOIN ComputerToComputerRule CTCR on CR.idComputerRule=CTCR.idComputerRule WHERE CTCR.idComputer='{C83E5766-3825-4C3A-B769-45163E25902B}' ORDER BY [Name]



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section of this article.



MORE INFORMATION
You can verify that you are experiencing this issue by manually running a select query by using Wbemtest.exe. To do this, follow these steps:  Log on to a computer as a MOM administrator. Click Start, and then click Run. Type Wbemtest.exe, and then click OK. Click Connect. Type the following in the Server\Namespace box, where  is the name of your MOM Server:

\\ \root\MOM

</li> Click Login, and then click Query.</li> Type select * from MSFT_ComputerToComputerGroup, and then click Apply.

If you receive a &quot;Generic Failure&quot; error, you may be experiencing this issue.</li></ol>

For more information about MOM 2000 Software Development Kit, visit the following Microsoft Web site:

http://technet.microsoft.com/en-us/opsmgr/bb498241.aspx

The following is the Associators query (using VBScript) that is in the MOM SDK. When you use this query, you do not receive the &quot;General Failure&quot; error. However, the query might not return all the associated computer groups. Function GetGroupsForComputer(strMOMServer, strComputerGUID) Dim objComputerGroups Dim strQuery strQuery = &quot;ASSOCIATORS OF {MSFT_Computer.GUID=&quot;&quot;&quot; & strComputerGUID & &quot;&quot;&quot;} WHERE  ResultClass=MSFT_ComputerGroup&quot; Set objComputerGroups = GetObject(&quot;WinMgmts://&quot; & strMOMServer &   &quot;\root\MOM&quot;).ExecQuery(strQuery) Set GetGroupsForComputer = objComputerGroups End Function

Additional query words: WMI Windows Management Instrumentation interface

Keywords: kbwbem kbsdk kbdatabase kbcollections kberrmsg kbmisctools kbnofix kbbug KB835303

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.