[OpsMgr] SCOM 2007 R2 CU5 does not update System Center Core Library as it was supposed to do

Posted: November 21, 2011 in SCOM, SCOM 2007

Just found an issue with SCOM 2007 R2 CU5 when updating from CU4. According to the deployment guide
Microsoft.SystemCenter.Library MP could have been updated to version 6.1.7221.81

But… update process fails to do this when you have CU4 installed.
According to KB this MP is supposed to be updated by CU5_Database.sql.

Looking into the script I easily identified “bottleneck”

DECLARE @ver nvarchar(25)
 DECLARE @compare int
 SET @ver = (SELECT Mpversion FROM ManagementPack WHERE MPName = 'Microsoft.SystemCenter.Library')
 -- Update Microsoft.SystemCenter.Libarary MP directly via SQL
 SET @compare = dbo.fn_VersionCompare (@ver, '6.1.7221.50')
 IF( @compare = -1)
 EXEC [dbo].[p_MPImportXML]
 @ManagementPackXML = N'

with CU4 installed Line 3 of the code sets @ver to ‘6.1.7221.61’.
Function ‘dbo.fn_VersionCompare’ does smart compare of two strings and returns

  • -1 if string1 is less than string2
  • 0 if strings are equal
  • 1  if string1 is greater than string2

with @ver=’6.1.7221.61′  function returns 1, this blocks update procedure to happen.

Once I identified where issue is. Let’s think about next steps.

There are tree options:

  1. download updated MP and import it from SCOM console. This is NOT recommended by Microsoft. There is a negative side affect: you may loose all connectors and will have to restore OpsDB from backup. See KB article for more details: http://support.microsoft.com/kb/2590414
  2. or correct CU5_Database.sql as follows:
    SET @compare = dbo.fn_VersionCompare (@ver, '6.1.7221.81')

    this is unsupported way. Follow at your own risk. I followed 🙂 and now have .81 MP installed.

  3. do nothing

Being IT geek I couldn’t help continuing and tried to compare two versions of the same MP.

doing this i’m trying to answer a question:

  • was this MP really updated from previous CU or it is just republish with new version number?

We have:
Microsoft.SystemCenter.Library.mp CU4 6.1.7221.61
Microsoft.SystemCenter.Library.mp CU5 6.1.7221.81

Loading both versions into notepad++ with compare plugin installed and clicking “Compare”….I see the only ONE difference and this line is MP Version.

so, option three is the right answer to the question: what to do next.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s