Good Day

I restored the OpsDB and WareHouse (SCOM 2012 SP1) from backup after an upgrade 
to R2 went bad.

I've got a situation where the Monitor "Data Warehouse Configuration 
Synchronization Data Writer Recovery State" is failing with the following error.

Number of Occurrences:

1

-Sample Data



Date and Time:

2016-05-31 01:27:01 AM

Log Name:

Operations Manager

Source:

Health Service Modules

Event Number:

31552

Level:

1

Logging Computer:

DERITSAMAN02.mgsops.net

User:

N/A


Description:

Failed to store data in the Data Warehouse. Exception 'SqlException': Sql 
execution failed. Error 2627, Level 14, State 1, Procedure 
ManagementPackInstall, Line 2879, Message: Violation of UNIQUE KEY constraint 
'UN_ManagementGroupManagementPackVersion_ManagementGroupRowIdManagementPackVersionRowId'.
 Cannot insert duplicate key in object 
'dbo.ManagementGroupManagementPackVersion'. The duplicate key value is (1, 
7585, Apr 18 2016 11:16AM). One or more workflows were affected by this. 
Workflow name: 
Microsoft.SystemCenter.DataWarehouse.Synchronization.Configuration Instance 
name: dc155bcd-d7d3-4252-9168-631c53f8e3e4 Instance ID: 
{7216CFAC-9319-2CF5-FB3F-92CEBA5DF314} Management group: DERSCOM2012


Event Data:
< DataItem type =" System.XmlData " time =" 2016-05-31T01:27:01.5200317+02:00 " 
sourceHealthServiceId =" 8F06D0E8-1C5A-C9A1-CAAB-A677CBFC0D0F " >
< EventData >
  < Data > DERSCOM2012 </ Data >
  < Data > Microsoft.SystemCenter.DataWarehouse.Synchronization.Configuration 
</ Data >
  < Data > dc155bcd-d7d3-4252-9168-631c53f8e3e4 </ Data >
  < Data > {7216CFAC-9319-2CF5-FB3F-92CEBA5DF314} </ Data >
  < Data > SqlException </ Data >
  < Data > Sql execution failed. Error 2627, Level 14, State 1, Procedure 
ManagementPackInstall, Line 2879, Message: Violation of UNIQUE KEY constraint 
'UN_ManagementGroupManagementPackVersion_ManagementGroupRowIdManagementPackVersionRowId'.
 Cannot insert duplicate key in object 
'dbo.ManagementGroupManagementPackVersion'. The duplicate key value is (1, 
7585, Apr 18 2016 11:16AM). </ Data >
  </ EventData >
  </ DataItem >




This is because, after the restore, the MP 
"Microsoft.SystemCenter.OperationsManager.DefaultUser" on the warehouse is one 
update ahead of the OpsDB.

This query on the warehouse
select c.ManagementPackDefaultName,b.ManagementPackVersion, a.*
from ManagementGroupManagementPackVersion a
join ManagementPackVersion b on a.ManagementPackVersionRowId = 
b.ManagementPackVersionRowId
join ManagementPack c on b.ManagementPackRowId = c.ManagementPackRowId
where ManagementPackDefaultName = 'Default Management Pack'
order by InstalledDateTime

Returns
[cid:[email protected]]
And this query on the OpsDB
select a.MPFriendlyName,b.*
from opsmgrdb1.operationsmanager.dbo.ManagementPack a
join opsmgrdb1.operationsmanager.dbo.ManagementPackHistory b on 
a.ManagementPackId = b.ManagementPackId
where a.MPName = 'Microsoft.SystemCenter.OperationsManager.DefaultUser'
order by timeadded desc

Returns
[cid:[email protected]]

You can see that the proc ManagementPackInstall in the error, is trying to 
insert the row with ManagementPackVersionRowId 7585, but it already exists.

I'm thinking of exporting this default pack, incrementing the version, and 
importing again.
Please advise if this is solution to use, or if there's a better way of 
resolving this.

Kind Regards


[ITServiceAssurance_Logo (2)]


Gareth Miles
System Center Technical Lead
Phone: +27 31 580 1582
Mobile: +27 83 648 8559




#############################################################################################
The information transmitted is intended only for the person or entity to which 
it 
is addressed and may contain confidential and/or privileged material. 
Any review, retransmission, dissemination or other use of, or taking of any 
action
in reliance upon, this information by persons or entities other than the 
intended 
recipient is prohibited. If you received this in error, please contact the 
sender and
delete the material from any computer.

Furthermore, the information contained in this message, and any attachments 
thereto, is
for information purposes only and may contain the personal views and opinions 
of the 
author, which are not necessarily the views and opinions of the company.
#############################################################################################



Reply via email to