Well first of all I really encourage you to upgrade to OM 2012 because it really brings a lot of features and fixes as well as cool integration with the other System Center 2012 products. Now thinking about a product which is very complex, also supports localization and allows a lot of flexibility and extensibility, then we also have to take in account that for different custom extensions or in certain situations, when upgrading from one major version to another, we can come across some issues ...

First of all before upgrading please remember because this is very important: CHECK EVERYTHING you find on TechNet and in the documentations before upgrading to be sure that you have not missed ANY step!

REMEMBER: If the upgrade of the old RMS and Management Group (databases) will fail, then you will LOSE your RMS and Management Group (databases).

This is why you must allways BACKUP both of your DATABASES, RMS Encryption Key so that you can rebuild your environment in the case of an upgrade failure before trying again.

 

Now I will write here about a list of known issues with the upgrade which you have to take into account and check before upgrading:

 

1. Upgrade failure when OM User Roles exist that have non-ENU locale

=========================================================================

There is an issue with the upgrade if there was any user roles created in OM which do NOT have ENU locale.

The errors in the Upgrade Log file will look like this:

 Error: :Failed to update user role: : Threw Exception.Type: Microsoft.EnterpriseManagement.Common.NullConstraintException, Exception Error Code: 0x80131500, Exception.Message: Parameter UserRoleDisplayName cannot be null.
Error: :StackTrace: at Microsoft.EnterpriseManagement.Common.Internal.SecurityConfigurationServiceProxy.UpsertUserRolesV2(ICollection`1 urUpdateResults, ICollection`1 urScopeUpdateResults, ICollection`1 urViewScopeUpdateResults, ICollection`1 urTaskScopeUpdateResults, ICollection`1 urConsoleTaskScopeUpdateResults, ICollection`1

 To verify if you would be impacted by this issue, you can run the following SQL Query on the Operational database:

SELECT
   DISTINCT UV.UserRoleId AS [UserRoleId],
   LT.LTValue AS [RoleName],
   LT.LanguageCode AS [LanguageCode]
FROM UserRoleView AS UV WITH(NOLOCK)
INNER JOIN LocalizedText AS LT WITH(NOLOCK)
   ON UV.UserRoleId = LT.LTStringId
WHERE LT.LanguageCode <> 'ENU'

 If you get any results back then please run this query to fix this and then upgrade to OM 2012:

 DELETE LocalizedText 
WHERE LTStringId IN (
   SELECT DISTINCT LT.LTStringId
   FROM UserRoleView AS UV WITH(NOLOCK)
   INNER JOIN LocalizedText AS LT WITH(NOLOCK)
      ON UV.UserRoleId = LT.LTStringId
   WHERE LT.LanguageCode <> 'ENU'
) AND LanguageCode <> 'ENU'

 Additionally please also verify this SQL query:

 SELECT *
FROM LocalizedText
WHERE
   LTValue LIKE '%Operation%Manager Report%' AND
   LTStringId NOT IN (
      SELECT DISTINCT(LTStringId)
      FROM LocalizedText
      WHERE LanguageCode = 'ENU'
   )

 Again here if you notice that you have any result then pease run this query to solve the issue:

 UPDATE LocalizedText
SET LanguageCode = 'ENU'
WHERE
   LTValue LIKE '%Operation%Manager Report%' AND
   LanguageCode <> 'ENU' AND
   LTStringId NOT IN (
      SELECT DISTINCT(LTStringId)
      FROM LocalizedText
      WHERE LanguageCode = 'ENU'
   )

 So now all the users should have the ENU locale in the database.

 

*ANOTHER* thing which is important here and what you should check, is that for every UserRole you *DO* have a DisplayName. If a UserRole does not have a DisplayName, the Upgrade will fail.

To check for this, open the OM PowerShell, and type: Get-UserRole | ft Name, DisplayName

If you get any results back where the DisplayName is missing, then open the OM Console and add the DisplayName there and then check again to see if you still have any UserRole with no DisplayName.

 

 

2. Upgrade failure if any discovered object exists that has a really long display name

==========================================================================

 The next issue is caused by any discovered object which has a really long display name. In the upgrade process the DisplayName from the BaseManagedEntity table is copied over to the DisplayName field of all the MT_* tables. The problem here is that the DisplayName from BaseManagedEntity supports a much longer charater string then the DisplayName filed of the MT_* tables do < NVARCHAR(MAX) vs NVARCHAR(256) >.

 If you are impacted by this issue you will see the following in the upgrade log file:

:Threw Exception.Type: System.Data.SqlClient.SqlException, Exception Error Code: 0x80131904, Exception.Message: String or binary data would be truncated.
String or binary data would be truncated.
The statement has been terminated.
The statement has been terminated.
Error: :StackTrace: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.EnterpriseManagement.OperationsManager.Setup.DBConfigurationHelper.DBConfiguration.RunSqlCommandsList(IEnumerable`1 sqlCommands)
Error: :RunStandardScripts failed with the following exception: : Threw Exception.Type: System.Reflection.TargetInvocationException, Exception Error Code: 0x80131604, Exception.Message: Exception has been thrown by the target of an invocation.
Error: :StackTrace: at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at Microsoft.EnterpriseManagement.SetupFramework.ActionEngine.Action.Run(String displayStringNamespace, ProgressData progressData, Func`2 progressDelegate)
at Microsoft.EnterpriseManagement.SetupFramework.ActionEngine.InstallStep.Run(String displayStringNamespace, ProgressData progressData, Func`2 progressDelegate)
Error: :Inner Exception.Type: System.Data.SqlClient.SqlException, Exception Error Code: 0x80131604, Exception.Message: String or binary data would be truncated.
String or binary data would be truncated.
The statement has been terminated.
The statement has been terminated.
Error: :InnerException.StackTrace: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.EnterpriseManagement.OperationsManager.Setup.DBConfigurationHelper.DBConfiguration.RunSqlCommandsList(IEnumerable`1 sqlCommands)
at Microsoft.EnterpriseManagement.OperationsManager.Setup.DBConfigurationHelper.DBConfiguration.RunSqlStringsFromSqlFile(String sqlFileName)
at Microsoft.EnterpriseManagement.OperationsManager.Setup.DBConfigurationHelper.DBConfiguration.RunSqlScripts(String configStep)
at Microsoft.SystemCenter.Essentials.SetupFramework.InstallItemsDelegates.OMDatabaseProcessor.RunStandardScripts()
Error: :FATAL ACTION: RunStandardScripts
Error: :FATAL ACTION: DatabaseActions
Error: :ProcessInstalls: Running the PostProcessDelegate returned false.
Always: :SetErrorType: Setting VitalFailure. currentInstallItem: Database Configuration
Error: :ProcessInstalls: Running the PostProcessDelegate for OMDATABASE failed.... This is a fatal item. Setting rollback.

 

 Now to check if you would be impacted by this issue, you can run this following SQL Query on the Operational database:

 SELECT
   DisplayName,
   LEN(DisplayName)
FROM BaseManagedEntity
WHERE LEN(DisplayName) > 255

 So if you get ANY results back, make sure that you backup your databases and execute this SQL query which will fix this and let you upgrade even with objects with display names longer than 256:

 DECLARE
   @TableName SYSNAME,
   @ColumnName SYSNAME,
   @Statement NVARCHAR(2000)
SELECT @ColumnName = ColumnName
FROM ManagedType AS MT WITH(NOLOCK)
JOIN ManagedTypeProperty AS MTP WITH(NOLOCK)
   ON MT.ManagedTypeId = MTP.ManagedTypeId
WHERE
   MT.TypeName = N'System.Entity' AND
   MTP.ManagedTypePropertyName = N'DisplayName'
SELECT TOP 1 @TableName = MT.ManagedTypeTableName
FROM ManagedType AS MT WITH(NOLOCK)
JOIN DerivedManagedTypes DMT
   ON MT.ManagedTypeId = DMT.BaseTypeId
WHERE
   MT.IsAbstract = 0 AND
   MT.IsDeleted = 0 AND
   DMT.BaseTypeId = DMT.NonAbstractBaseTypeId AND
   DMT.Level = 0 AND
   MT.ManagedTypeTableName IS NOT NULL
ORDER BY MT.ManagedTypeTableName
WHILE (@@ROWCOUNT <> 0) BEGIN
   SET @Statement = N'
   IF NOT EXISTS(
      SELECT *
      FROM sys.columns AS C WITH(NOLOCK)
      JOIN sys.types AS T WITH(NOLOCK)
         ON C.user_type_id = t.user_type_id
      WHERE
         C.name = ''' + @ColumnName + ''' AND
         C.object_id = OBJECT_ID(''' + @TableName + ''') AND
         T.name = ''nvarchar'' AND
         C.max_length = 8000
   ) BEGIN
      ALTER TABLE ' + @TableName + '
      ALTER COLUMN ' + @ColumnName + ' NVARCHAR(4000)
   END'
   EXEC(@Statement)
   SELECT TOP 1 @TableName = MT.ManagedTypeTableName
   FROM ManagedType AS MT WITH(NOLOCK)
   JOIN DerivedManagedTypes AS DMT WITH(NOLOCK)
      ON MT.ManagedTypeId = DMT.BaseTypeId
   WHERE
      MT.IsAbstract = 0 AND
      MT.IsDeleted = 0 AND
      DMT.BaseTypeId = DMT.NonAbstractBaseTypeId AND
      DMT.Level = 0 AND
      MT.ManagedTypeTableName IS NOT NULL AND
      MT.ManagedTypeTableName > @TableName
   ORDER BY MT.ManagedTypeTableName
END

 

 

3. Upgrade failure when certain custom\unsealed Management Packs exist in OM

 ==========================================================================

 There are some Management Packs which cause the upgrade process from 2007 R2 to 2012 to fail because of the fact that this/these Management Pack(s) fail to be upgraded to 2012 Schema Version.

 Here is what the upgrade log file will look if you ran into this issue:

 Info: :Updating Schema from v1 to v2
Error: :Error:failed to migrate old MPs. This is a fatal error
Error: :ImportManagementPacks failed with the following exception: : Threw Exception.Type: System.Reflection.TargetInvocationException, Exception Error Code: 0x80131604, Exception.Message: Exception has been thrown by the target of an invocation.
Error: :StackTrace: at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at Microsoft.EnterpriseManagement.SetupFramework.ActionEngine.Action.Run(String displayStringNamespace, ProgressData progressData, Func`2 progressDelegate)
at Microsoft.EnterpriseManagement.SetupFramework.ActionEngine.InstallStep.Run(String displayStringNamespace, ProgressData progressData, Func`2 progressDelegate)
Error: :Inner Exception.Type: System.ApplicationException, Exception Error Code: 0x80131604, Exception.Message: Failed to migrate OM MPs to OM12 schema
Error: :InnerException.StackTrace: at Microsoft.SystemCenter.Essentials.SetupFramework.InstallItemsDelegates.OMDatabaseProcessor.ImportManagementPacks(String installMode, ProgressData progressData, Func`2 progressDelegate)
Error: :FATAL ACTION: ImportManagementPacks
Error: :FATAL ACTION: DatabaseActions
Error: :ProcessInstalls: Running the PostProcessDelegate returned false.
Always: :SetErrorType: Setting VitalFailure. currentInstallItem: Database Configuration
Error: :ProcessInstalls: Running the PostProcessDelegate for OMDATABASE failed.... This is a fatal item. Setting rollback.

 

Here are the known issues which could cause this failure and the SQL Queries with which to check if you would be impacted or not, including of course the solution for each of them:

         Cause 1: OM07 allows display strings targeted to element not existed however OM12 does not so the following import fails.

 To check if you would be impacted by this scenario, please execute the following SQL Query on your OM Database:

 SELECT M.MPName, M.MPFriendlyName, D.ElementName
FROM ManagementPack AS M WITH(NOLOCK)
INNER JOIN DisplayStringView AS D WITH(NOLOCK)
   ON M.ManagementPackId = D.ManagementPackId
WHERE
   D.MPElementId <> M.ManagementPackId
   AND D.MPElementId NOT IN (
      SELECT MPElementId
      FROM MPElementView
   )
   AND M.MPName NOT IN (
      'System.Health.Internal',
      'System.BaseliningTasks.Library',
      'Microsoft.SystemCenter.ClientMonitoring.Internal',
      'Microsoft.SystemCenter.Notifications.Internal'
   )
ORDER BY M.MPName, D.ElementName

If you get back any results, then for all display strings targeted to D.ElementName in these Management Packs, first check whether element name is correct. If it’s not misspelling issue, remove these display strings and if it is a misspelling issue, then correct it so that it matches the actual element name.

 

         Cause 2: Missing MP reference to System.Library for Management Packs having Console Tasks defined.

To check if you would be impacted by this scenario, please execute the following SQL Query on your OM Database:

 DECLARE @SystemLibaryId UNIQUEIDENTIFIER
SELECT @SystemLibaryId = ManagementPackId
   FROM ManagementPack WITH(NOLOCK)
   WHERE MPName = 'System.Library'
SELECT DISTINCT(M.MPName), M.MPFriendlyName
FROM ManagementPack AS M WITH(NOLOCK)
INNER JOIN ConsoleTask AS C WITH(NOLOCK)
   ON M.ManagementPackId = C.ManagementPackId
WHERE NOT EXISTS (
   SELECT *
   FROM ManagementPackReferences AS R WITH(NOLOCK)
   WHERE
      R.ManagementPackIdReffedBy = M.ManagementPackId
      AND R.ManagementPackIdSource = @SystemLibaryId
)

If you get any results back, then modify these Management Packs and add the Reference to the System.Library Management Pack.

 

         Cause 3: Duplicate entries for CategoryOverride, ModuleOverride or MonitorOverride.

To check if you would be impacted by this scenario, please execute the following SQL Query on your OM Database:

 SELECT MPName, MPFriendlyName
FROM ManagementPack WITH(NOLOCK)
WHERE MPXML IS NULL

If you get any results back, then uninstall these Management Packs and reinstall them after upgrade. 

 

NOTE: If you are unsure of what do to here, then for *extra* safety and if it is possible, just remove all your 3rd party and custom Management Packs and import them back into OM after it was successfully upgraded to 2012.

 

 

4. Upgrade fails due to the fact that the db_owner user of the OM database is a SQL user and NOT a Domain Account

======================================================================================================

If we have SQL installed in Mixed Authentication Mode, if the db_owner of the OM database is a SQL User and NOT a Domain Account, the upgrade will fail with this error message:

"operation database configuration failed to install"

Here is what the upgrade log file will look if you ran into this issue:

: Error: :PopulateUserRoles: failed : Threw Exception.Type: System.Runtime.InteropServices.COMException, Exception Error Code: 0x80070539, Exception.Message: The security ID structure is invalid. (Exception from HRESULT: 0x80070539)
: Error: :StackTrace: at Microsoft.Mom.Sdk.UserRoleSetup.SetupProgram.populateUserRoles(String adminRoleGroup, String sdkAccount, InstallTypes installType, String installDirectory, Boolean overwriteExistingUsers)
   at Microsoft.EnterpriseManagement.OperationsManager.Setup.ServerConfiguration.PopulateUserRoles(String adminRoleGroup, String sdkAccount, String installDirPath)
: Error: :FATAL ACTION: PopulateUserRoles
: Error: :FATAL ACTION: DatabaseActions
: Error: :ProcessInstalls: Running the PostProcessDelegate returned false.
: Always: :SetErrorType: Setting VitalFailure. currentInstallItem: Database Configuration
: Error: :ProcessInstalls: Running the PostProcessDelegate for OMDATABASE failed.... This is a fatal item. Setting rollback.

 

To solve this issue make sure that you set SQL Authentication to Windows Authentication and that you change the db_owner of the OM database to a Domain Account - it has to be a domain account, not a local account. Please *also* make sure that there exists no SQL User which also has the db_owner rights on either of the OM databases. If such SQL Users exist, then just make sure that you remove the db_owner role from the OM databases.

 

 

5. Unable to see any performance or availability details using Widgets

=============================================================

When using Performance Widgets you may experience one or more of the following symptoms:

  1. While creating Performance widgets, none of the performance objects/counters are shown in the wizard.
  2. You are unable to retrieve availability details using OpsMgr state widgets.
  3. Network dashboard views are not showing any availability details or performance details.
  4. The Reset Health State task fails with the exception below shown under the task status view:

A module reported an error 0x80070490 from a callback which was running as part of rule "System.Health.ResetState" running for instance "<instance name>" with id:"{GUID}" in management group "<Management Group Name>".Error Code: -2130771918 (Unknown error (0x80ff0032)).

To check if you are impacted by this issue, run this SQL Query on the operational database:

 IF EXISTS (
   SELECT *
   FROM __MOMManagementGroupInfo__ AS MGI WITH(NOLOCK)
   JOIN MT_ManagementGroup AS MG WITH(NOLOCK)
      ON MGI.ManagementGroupId = MG.Id_6B1D1BE8_EBB4_B425_08DC_2385C5930B04
) BEGIN
   PRINT 'OK - issue NOT found.'
END ELSE BEGIN
   PRINT '!!! THE ISSUE EXISTS !!!'
END

 Now if you get the message that the issue exists, then execute this SQL Query to fix it:

 UPDATE __MOMManagementGroupInfo__
SET ManagementGroupId = (
   SELECT TOP 1 Id_6B1D1BE8_EBB4_B425_08DC_2385C5930B04
   FROM MT_ManagementGroup WITH(NOLOCK)
)

 Now you should be able to see perfromance or availabilty data in the Widgets.

 

 

CHEERS! :D