Upgrading to SCOM2012 to SCOM2016

The upgrade path is simple, this is it, ensure that you complete all these steps on your SCOM2012 R2 environment.

1.       Back up the Operations Manager Databases
2.       Review the Operations Manager Event Logs
3.       Cleanup the Database (ETL Table)
4.       Remove Agents from Pending Management
5.       Disable the Notification Subscriptions
6.       Stop the Services or Disable any Connectors
7.       Verify that the Operational Database Has More Than 50 Percent Free Space
8.       Back up the Operations Manager Databases

The clean-up SQL which confirms rows to be deleted looks like this:

DECLARE @SubscriptionWatermark bigint = 0;
1.       SELECT @SubscriptionWatermark = dbo.fn_GetEntityChangeLogGroomingWatermark();
2.       Select COUNT (*)
FROM EntityTransactionLog ETL with(nolock)
WHERE NOT EXISTS (SELECT 1 FROM EntityChangeLog ECL with(nolock) WHERE ECL.EntityTransactionLogId = ETL.EntityTransactionLogId)
AND NOT EXISTS (SELECT 1 FROM RelatedEntityChangeLog RECL with(nolock) WHERE RECL.EntityTransactionLogId = ETL.EntityTransactionLogId)
AND EntityTransactionLogId < @SubscriptionWatermark;

Then the ETL clean-up looks like this:

DECLARE @RowCount int = 1;
DECLARE @BatchSize int = 100000;
DECLARE @SubscriptionWatermark bigint = 0;
DECLARE @LastErr int;
SELECT @SubscriptionWatermark = dbo.fn_GetEntityChangeLogGroomingWatermark();
WHILE(@RowCount > 0)
BEGIN
DELETE TOP (@BatchSize) ETL
FROM EntityTransactionLog ETL
WHERE NOT EXISTS (SELECT 1 FROM EntityChangeLog ECL WHERE ECL.EntityTransactionLogId = ETL.EntityTransactionLogId)
AND NOT EXISTS (SELECT 1 FROM RelatedEntityChangeLog RECL WHERE RECL.EntityTransactionLogId = ETL.EntityTransactionLogId)
AND ETL.EntityTransactionLogId < @SubscriptionWatermark;
SELECT @LastErr = @@ERROR, @RowCount = @@ROWCOUNT;
END
Once this is complete the databases will be backed up including reporting, OperationsManager and DW


I will stop the following SCOM services on all of the Management Servers:

Microsoft Monitoring Agent (healthservice)
System Center Data Access Service (OMSDK)
System Center Management Configuration (cshost)
Then once all this is done, run the upgrade.....


Previous Post Next Post

☕️ Buy me a coffee ?

If any of these articles have helped you out consider buying me a coffee, completely optional, but would be appreciated!

نموذج الاتصال