Incomplete results when you query a Microsoft Operations Manager 2000 database (835303)



The information in this article applies to:

  • Microsoft Operations Manager 2000

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 ComputerGroup 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 "Applies to" 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:
  1. Log on to a computer as a MOM administrator.
  2. Click Start, and then click Run.
  3. Type Wbemtest.exe, and then click OK.
  4. Click Connect.
  5. Type the following in the Server\Namespace box, where MOMServerName is the name of your MOM Server:

    \\MOMServerName\root\MOM

  6. Click Login, and then click Query.
  7. Type select * from MSFT_ComputerToComputerGroup, and then click Apply.

    If you receive a "Generic Failure" error, you may be experiencing this issue.
For more information about MOM 2000 Software Development Kit, visit the following Microsoft Web site:

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

Modification Type:MajorLast Reviewed:4/8/2004
Keywords:kbWBEM kbSDK kbDatabase kbCollections kberrmsg kbMiscTools kbnofix kbBug KB835303 kbAudITPRO