Troubleshooting the import failure of the Active Directory 2008 Management Pack for MOM 2005

fixHere’s an issue I ran into when I was trying to import the Active Directory 2008 Management pack for MOM 2005 SP1, and since I didn’t see it documented anywhere I thought I’d post it here.  I was trying to Import the Active Directory 2008 Management pack for MOM 2005 and it was failing with the following warning:

Warning: ComputerRule (ID:'{BE192596-4C5E-4B4E-8840-57A67FBDAB9D}'): failed to update, error: Error information has 2 rows and 6 columns.Err 0: op = 0, HRESULT = 80040e2f, Description = The statement has been terminated., SQL native = 3621, SQL description = 01000, Method name = ComputerRuleUpdatePKAndTimeErr 1: op = 0, HRESULT = 80040e2f, Description = Cannot insert duplicate key row in object 'ComputerRule' with unique index 'UI_Name'., SQL native = 2601, SQL description = 23000, Method name = ComputerRuleUpdatePKAndTimeFound 2 errors, 0 were collisions.

Here’s what I did to troubleshoot the issue:

At the time of importing a Management Pack, if the import fails it should generate a log which is the first place you should be looking for any warnings or error messages.  In my case I could see the following:

Detail Information
Operation: Backup Management Pack
Name: E:\allnew2009\Microsoft Windows Server 2008 Active Directory.akm
Status: Success
Description: Passed

*************************************************

Management Pack Description: The Microsoft Windows Active Directory Management Pack module monitors the events Active Directory places in the System and Application event logs. This Management Pack module includes several performance counters to monitor the overall performance of the Active Directory. Analyzing this performance information allows you to perform accurate load balancing and capacity planning, and alerts you to possible future problems.

Detail Information
Operation: Import Management Pack
Name: E:\allnew2009\Microsoft Windows Server 2008 Active Directory.akm
Status: Warning
Description: Passed
Sub Operation: Importing Management Pack from 'E:\allnew2009\Microsoft Windows Server 2008 Active Directory.akm' to DB '<serverName>'
Sub Operation: Loading Management Pack from:'E:\allnew2009\Microsoft Windows Server 2008 Active Directory.akm'
Sub Operation: Loading Management Pack from DB, server:<serverName>'
Sub Operation: Saving Management Pack to DB, server:<serverName>'
Sub Operation: Loading Management Pack from DB, server:'<serverName>'
Sub Operation: Saving Management Pack to DB, server:'<serverName>'

Warning: ComputerRule (ID:'{BE192596-4C5E-4B4E-8840-57A67FBDAB9D}'): failed to update, error: Error information has 2 rows and 6 columns.Err 0: op = 0, HRESULT = 80040e2f, Description = The statement has been terminated., SQL native = 3621, SQL description = 01000, Method name = ComputerRuleUpdatePKAndTimeErr 1: op = 0, HRESULT = 80040e2f, Description = Cannot insert duplicate key row in object 'ComputerRule' with unique index 'UI_Name'., SQL native = 2601, SQL description = 23000, Method name = ComputerRuleUpdatePKAndTimeFound 2 errors, 0 were collisions.  

Sub Operation: Importing Management Pack from 'E:\allnew2009\Microsoft Windows Server 2008 Active Directory.akm' to DB '<serverName>'

From the warning above it is evident that there is a duplicate key row in the "ComputerRule" table with ID “BE192596-4C5E-4B4E-8840-57A67FBDAB9D”

Now in order to figure out what object the ID “BE192596-4C5E-4B4E-8840-57A67FBDAB9D” references, I did the following on my lab machine before making any changes with the MOM Server in the production environment.

Lab test

Since the ID “BE192596-4C5E-4B4E-8840-57A67FBDAB9D” references the “ComputerRule” table in the OnePoint database, I ran the following query:

select * from computerrule where idComputerRule = 'BE192596-4C5E-4B4E-8840-57A67FBDAB9D'

Output:

BE192596-4C5E-4B4E-8840-57A67FBDAB9D Windows Server 2003 Domain Controllers 0 1 24 NULL 2 0 NULL 2 0 Any Domain Controllers running Windows Server 2003 AttributeValue(Windows Current Version)="5.2" 726D49EE-6F3A-11D2-A404-00A0C9AFE040 1 2009-06-16 09:06:24.670 2009-06-16 10:14:17.723 AB\Administrator 0x010000000000000000000000

This tells us that the ID references the "Windows Server 2003 Domain Controllers" Computer group.  This computer group gets created when you import the Active Directory 2008 Management Pack.  I next tried deleting the row using the query:

delete from computerrule where idComputerRule = 'BE192596-4C5E-4B4E-8840-57A67FBDAB9D'

I was unable to delete it because it had a reference to the "computerruletoprocessrulegroup" table so I then ran the following query:

select * from computerruletoprocessrulegroup where idcomputerrule = 'BE192596-4C5E-4B4E-8840-57A67FBDAB9D'

Output:

B621A0FD-1870-4358-ACB1-D4AE207E9185 BE192596-4C5E-4B4E-8840-57A67FBDAB9D 7E49D8FD-5186-4353-9AAE-14D646BAE54D 2009-06-16 10:14:17.710
36D82219-2B35-4B10-8C09-2C69644F9986 BE192596-4C5E-4B4E-8840-57A67FBDAB9D AE2760FD-770D-45BA-9C04-3241E3DF1539 2009-06-16 09:06:25.977
E276EE36-7E57-47EA-977F-A983A73F3009 BE192596-4C5E-4B4E-8840-57A67FBDAB9D 73A45127-F46E-4537-8F99-6301B49B3DB2 2009-06-16 09:06:25.943
C7CA7B0A-0B06-4922-8559-46945E712C60 BE192596-4C5E-4B4E-8840-57A67FBDAB9D 2CFE6B6A-2A04-4E88-B663-A8C17C9C748D 2009-06-16 09:06:25.913

The output above returned even more GUID’s so again to find out what these GUIDS reference I ran the following query:

select * from processrule where idprocessRule in (select idprocessrule from computerruletoprocessrulegroup where idcomputerrule = 'BE192596-4C5E-4B4E-8840-57A67FBDAB9D')

Output:

Returned four rule groups as follows
7E49D8FD-5186-4353-9AAE-14D646BAE54D NULL NULL 1 Active Directory Windows 2000 and Windows Server 2003 Container for rules that are common to Microsoft Windows 2000 Active Directory and Microsoft Windows Server 2003 Active Directory. 1 0 726D49EC-6F3A-11D2-A404-00A0C9AFE040 0 EC69D354-7405-11D2-A6E8-00A0C97148B7 FAF785AB-0651-4D95-A34C-387F12330AE9 0 NULL NULL NULL 2009-06-16 06:16:38.070 2004-03-20 19:07:11.410 AB\Administrator
AE2760FD-770D-45BA-9C04-3241E3DF1539 NULL NULL 1 Replication Topology Discovery (Connection Objects) Discovers Active Directory replication connection object toplogy 1 0 726D49EC-6F3A-11D2-A404-00A0C9AFE040 0 EC69D354-7405-11D2-A6E8-00A0C97148B7 08419A8B-6E42-448E-B876-E1D043AD178B 0 NULL NULL NULL 2009-06-16 09:06:25.623 2004-04-02 17:38:42.737 AB\Administrator
73A45127-F46E-4537-8F99-6301B49B3DB2 NULL NULL 1 Active Directory Windows Server 2003 Container for Windows Server 2003 specific rules for monitoring Active Directory 1 0 726D49EC-6F3A-11D2-A404-00A0C9AFE040 0 EC69D354-7405-11D2-A6E8-00A0C97148B7 2DB4ACA7-DE49-4557-A247-9E983D79E2E9 0 NULL NULL NULL 2009-06-16 09:06:25.517 2003-10-25 19:08:02.453 AB\Administrator
2CFE6B6A-2A04-4E88-B663-A8C17C9C748D NULL NULL 1 Replication Latency Monitoring This rule group contains the rules required to monitor replication in Active Directory. 1 0 726D49EF-6F3A-11D2-A404-00A0C9AFE040 0 EC69D354-7405-11D2-A6E8-00A0C97148B7 00000000-0000-0000-0000-000000000000 0 NULL NULL NULL 2009-06-16 09:06:25.360 2004-04-02 17:39:17.073 AB\Administrator

All Rule groups that are associated with the "Windows Server 2003 Domain Controllers" Computer group were returned as output as a result of running the above query, so now it make sense why it wasn't allowing the Computer group to be deleted as it is associated with the following rule groups:

a. Active Directory Windows 2000 and Windows Server 2003
b. Replication Topology Discovery (Connection Objects)
c. Active Directory Windows Server 2003
d. Replication Latency Monitoring

So now I ran the following delete operation to disassociate the rule groups from the computer group "Windows Server 2003 Domain Controllers":

delete from computerruletoprocessrulegroup where idcomputerrule = 'BE192596-4C5E-4B4E-8840-57A67FBDAB9D'

After that, I ran the following query to delete the computer group "Windows Server 2003 Domain Controllers":

delete from computerrule where idComputerRule = 'BE192596-4C5E-4B4E-8840-57A67FBDAB9D'

This time I succeeded in deleting the computer rule with ID 'BE192596-4C5E-4B4E-8840-57A67FBDAB9D'

To test whether I am able to now import the AD 2008 Management Pack now, I imported the Management Pack again and I got the MP imported without any problems.  Also the Computer Group "Windows Server 2003 Domain Controllers" and associated rule groups that I deleted earlier were recreated successfully.

Looking back, the cause was a duplicate Computer group “Windows Server 2003 Domain Controllers” that was causing the AD 2008 MP import to fail.   This computer group had no rule groups associated with it so I simply deleted this computer group using the following query:

delete from computerrule where idComputerRule = '2071E3CE-9D89-4542-8069-640E96372E8C'

Resolution: So now with the tests done in my lab, I had to import the AD 2008 MP in the production environment.

I deleted the "Windows Server 2003 Domain Controllers" Computer group after disassociating the rule groups and then tried importing the Active Directory 2008 MP again. It succeeded this time but with a different warning message:

Detail Information
Operation: Backup Management Pack
Name: E:\allnew2009\Microsoft Windows Server 2008 Active Directory.akm
Status: Success
Description: Passed

*************************************************

Management Pack Description: The Microsoft Windows Active Directory Management Pack module monitors the events Active Directory places in the System and Application event logs. This Management Pack module includes several performance counters to monitor the overall performance of the Active Directory. Analyzing this performance information allows you to perform accurate load balancing and capacity planning, and alerts you to possible future problems.
Detail Information
Operation: Import Management Pack
Name: E:\allnew2009\Microsoft Windows Server 2008 Active Directory.akm
Status: Warning
Description: Passed
Sub Operation: Importing Management Pack from 'E:\allnew2009\Microsoft Windows Server 2008 Active Directory.akm' to DB 'blr-ec-ms01'
Sub Operation: Loading Management Pack from:'E:\allnew2009\Microsoft Windows Server 2008 Active Directory.akm'
Sub Operation: Loading Management Pack from DB, server:'<serverName>'
Sub Operation: Saving Management Pack to DB, server:'<serverName>'
Sub Operation: Loading Management Pack from DB, server:'<serverName>'
Sub Operation: Saving Management Pack to DB, server:'<serverName>'
Warning: ComputerRule: found duplicate name 'Windows Server 2003 Domain Controllers' and successfully renamed to 'Copy of Windows Server 2003 Domain Controllers'
Sub Operation: Importing Management Pack from 'E:\allnew2009\Microsoft Windows Server 2008 Active Directory.akm' to DB '<serverName>'
*************************************************

From the MOM admin console I see two computer groups now:

a. Windows Server 2003 Domain Controllers
b. Copy of Windows Server 2003 Domain Controllers

From the Query Analyzer window I ran the following queries in the production environment:

select * from computerrule where name like '%2003 Domain Controllers'

Output:

Got two entries as follows
BE192596-4C5E-4B4E-8840-57A67FBDAB9D Copy of Windows Server 2003 Domain Controllers 0 1 24 NULL 2 0 NULL 2 0 Any Domain Controllers running Windows Server 2003 AttributeValue(Windows Current Version)="5.2" 726D49EE-6F3A-11D2-A404-00A0C9AFE040 1 2009-06-16 09:39:11.593 2004-02-17 22:22:39.853 0x010000000000000000000000

2071E3CE-9D89-4542-8069-640E96372E8C Windows Server 2003 Domain Controllers 1 1 24 NULL 2 0 NULL 2 0 NULL
(AttributeValue(DomainControllerService) AND (AttributeValue(Windows Current Version) = "5.2")) 726D49EE-6F3A-11D2-A404-00A0C9AFE040 12009-02-26 11:22:03.733 2009-02-26 12:27:40.797
0x010000005B0000000500000077006900700072006F0001000000020000000B00000062006C0072002D00650063002D006400630030003100010000000
20000000500000077006900700072006F0001000000020000000B00000062006C0072002D00650063002D006400630030003200010000000200000005000000770069

The "2071E3CE-9D89-4542-8069-640E96372E8C Windows Server 2003 Domain Controllers" Computer group found was a duplicate entry.  To find out if there are any rule groups associated with it I ran the following query:

select * from processrule where idprocessRule in (select idprocessrule from computerruletoprocessrulegroup where idcomputerrule = '2071E3CE-9D89-4542-8069-640E96372E8C')

Output:

No entries returned

The computer group with ID "2071E3CE-9D89-4542-8069-640E96372E8C” had no rule group association as the previous query did not return any rows.  I deleted this duplicate Computer Group and once that was done I was able to successfully import the Active Directory 2008 Management Pack.

Chances are you won’t run into this exact problem, but if you run into something similar  then you should be able to follow the same method I outlined here and be able to determine what may be causing your issue.

Hope this helps,

Adnan Ezzi | Support Engineer