In this recipe, we will walk you through the steps of upgrading your environment from Service Manager 2012 R2 to Service Manager 2016.
Before performing an upgrade to Service Manager 2016, please make sure that you have carefully read the previous recipe, Preparing for Service Manager 2016, and that you have met all the requirements.
Before you start the upgrade, we recommend that you back up your Service Manager database, your Service Manager Data Warehouse databases, your reporting databases, and your encryption keys.
Due to the move to the .NET Framework 4.5.1 and changes to the SDK, the upgrade to Service Manager 2016 may break the custom solutions made in house or by third party (non-Microsoft), as discussed in the previous chapter. Make sure you have all new versions at hand before doing the upgrade.
The order in which you perform your upgrade tasks is important. You must start with the Data Warehouse management server, followed by the initial Service Manager management server, and then by any secondary management servers. Then you can optionally deploy the new Self-Service Portal or upgrade your existing portal.
You can skip this section and continue with the next chapter if you do not have a Data Warehouse in your deployment.
If you have installed a Data Warehouse in your Service Manager environment, you cannot perform and upgrade if you have not registered with the Service Manager data warehouse. Moreover, it is recommended that initial synchronization of the Data Warehouse is complete.
You will need to disable the Data Warehouse job schedules before you start the upgrade. To do so, log on to the Data Warehouse management server and start PowerShell, and then run the following script:
cd (Get-ItemProperty -path 'HKLM:SOFTWAREMicrosoftMicrosoft Operations Manager3.0Setup').InstallDirectory Import-Module .Microsoft.EnterpriseManagement.Warehouse.Cmdlets.psd1 Get-SCDWJob | ? {$_.Name -match 'Extract_'} | foreach {Disable-SCDWJobSchedule -JobName $_.Name} Disable-SCDWJobSchedule -JobName Transform.Common Disable-SCDWJobSchedule -JobName Load.Common Disable-SCDWJobSchedule -JobName DWMaintenance Disable-SCDWJobSchedule -JobName MPSyncJob Start-SCDWJob -JobName MPSyncJob
In some cases, a problem with the upgrade process causes the MPSync job to fail after the upgrade is complete. To prevent this, please run the following script on the DWRepository
database:
;WITH FactName AS ( select w.WarehouseEntityName from etl.WarehouseEntity w join etl.WarehouseEntityType t on w.WarehouseEntityTypeId = t.WarehouseEntityTypeId where t.WarehouseEntityTypeName = 'Fact' ),FactList AS ( SELECT PartitionName, p.WarehouseEntityName, RANK() OVER ( PARTITION BY p.WarehouseEntityName ORDER BY PartitionName ASC ) AS RK FROM etl.TablePartition p join FactName f on p.WarehouseEntityName = f.WarehouseEntityName ) , FactPKList AS ( SELECT f.WarehouseEntityName, a.TABLE_NAME, a.COLUMN_NAME, b.CONSTRAINT_NAME, f.RK, CASE WHEN b.CONSTRAINT_NAME = 'PK_' + f.WarehouseEntityName THEN 1 ELSE 0 END AS DefaultConstraints FROM FactList f JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE a ON f.PartitionName = a.TABLE_NAME JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS b ON a.CONSTRAINT_NAME = b.CONSTRAINT_NAME AND b.CONSTRAINT_TYPE = 'Primary key' ) , FactWithoutDefaultConstraints AS ( SELECT a.* FROM FactPKList a LEFT JOIN FactPKList b ON b.WarehouseEntityName = a.WarehouseEntityName AND b.DefaultConstraints = 1 WHERE b.WarehouseEntityName IS NULL AND a.RK = 1 ) , FactPKListStr AS ( SELECT DISTINCT f1.WarehouseEntityName, f1.TABLE_NAME, f1.CONSTRAINT_NAME, F.COLUMN_NAME AS PKList FROM FactWithoutDefaultConstraints f1 CROSS APPLY ( SELECT '[' + COLUMN_NAME + '],' FROM FactWithoutDefaultConstraints f2 WHERE f2.TABLE_NAME = f1.TABLE_NAME ORDER BY COLUMN_NAME FOR XML PATH('') ) AS F (COLUMN_NAME) ) SELECT 'ALTER TABLE [dbo].[' + f.TABLE_NAME + '] DROP CONSTRAINT [' + f.CONSTRAINT_NAME + ']' + CHAR(13) + CHAR(10) + 'ALTER TABLE [dbo].[' + f.TABLE_NAME + '] ADD CONSTRAINT [PK_' + f.WarehouseEntityName + '] PRIMARY KEY NONCLUSTERED (' + SUBSTRING(f.PKList, 1, LEN(f.PKList) -1) + ')' + CHAR(13) + CHAR(10) FROM FactPKListStr f
You can now start the upgrade process on the Data Warehouse Management Server by executing Setup.exe
from the Service Manager installation media:
You can now start the upgrade process on the management server(s). If you have multiple management servers in your environment, you must start with the workflow (primary) management server:
Once all your servers are upgraded to Service Manager 2016, you can upgrade all your Service Manager consoles:
In case you have a Data Warehouse in your Service Manager environment, you will need to perform some post-upgrade tasks, which are explained in this chapter. You can ignore these steps if you do not have a Data Warehouse:
Restart-Service omsdk, omcfg
cd (Get-ItemProperty -path 'HKLM:SOFTWAREMicrosoftMicrosoft Operations Manager3.0Setup').InstallDirectory Import-Module .Microsoft.EnterpriseManagement.Warehouse.Cmdlets.psd1 Get-SCDWJob | ? {$_.Name -match 'Extract_'} | foreach {Enable-SCDWJobSchedule -JobName $_.Name} Enable-SCDWJobSchedule -JobName Transform.Common Enable-SCDWJobSchedule -JobName Load.Common Enable-SCDWJobSchedule -JobName DWMaintenance Enable-SCDWJobSchedule -JobName MPSyncJob Start-SCDWJob -JobName MPSyncJob
Service Manager 2016 is designed in a way that supports an in-place upgrade from Service Manager 2012 R2 to Service Manager 2016, thus minimizing the efforts and risks involved with the upgrade procedure. However, there are still some important aspects that need to be carefully taken into consideration before performing the upgrade.