Upgrade guide from SCOM 2007 to SCOM 2012

Hi Guys,

I would like to share with you my notes concerning the upgrade from Operations Manager 2007 to Operations Manager 2012. The guide below groups information from TechNet (for which I’m not the author! all credits go to Microsoft), my personal notes and screenshots from the field.

The pre-requisites for this guide is to have a Operations Manager 2012 compliant environment (OS version /SQL version / hardware).

SCOM 2012 – Upgrade Plan

More Information: http://technet.microsoft.com/en-us/library/hh476934.aspx

Distributed Upgrade (Simple)

Use this path when you have an Operations Manager 2007 R2 management group where various features are installed on separate servers, all of which meet the minimum supported configurations for System Center 2012 – Operations Manager.

Upgrade Process Flow Diagram

Checklist

Use the following checklist to upgrade your distributed management group if it already meets the supported configuration requirements for System Center 2012 – Operations Manager.

 More Information: http://technet.microsoft.com/en-us/library/hh241301.aspx

 

Task

Import the Upgrade Helper management pack.

Move agents that report to the RMS to a secondary management server.

Back up the encryption key.

Review the Operations Manager 2007 R2 event logs.

Remove agents from pending management.

Verify that you have a supported SQL Server collation on all databases and instances of databases.

Upgrade the manually installed agents.

Upgrade the secondary management servers.

Upgrade gateways, if present.

Upgrade the push-installed agents.

Check for any active, connected consoles to the root management server.

Disable all notification subscriptions.

Stop services or disable any connectors that are installed.

Verify that your operational database has enough free space.

Back up the databases.

Restore the encryption key on secondary management server.

Run management group upgrade on the root management server.

Upgrade or install the optional features, such as the web consoles and Reporting server.

Re-enable notification subscriptions.

Restart or re-enable the service for any connectors that are installed.

Update overrides.

Verify the success of the upgrade.

Import the Upgrade Helper management pack.

The Upgrade Helper management pack guides you through the upgrade process from System Center Operations Manager 2007 R2 to System Center 2012. The Upgrade Helper management pack discovers the root management server, secondary management servers, gateway servers, and any agent-managed computers in your distributed Operations Manager 2007 R2 management group. The Upgrade Helper management pack monitors the progress of each phase of your upgrade.

Filename: OPERATIONSMANAGER.UPGRADE.MP

Back up the encryption key.

To start the Encryption Key Backup or Restore Wizard to back up the root management server encryption key

  1. Log on to the computer hosting the root management server with an account that is a member of the Administrators group.
  2. Open a command prompt window using the Run as Administrator option.
  3. At the command prompt, type

    cd <Operations Manager Installation Folder>

  4. Type SecureStorageBackup and then press ENTER.
  5. In the Encryption Key Backup or Restore Wizard, on the Backup or Restore? Page, select the Backup the Encryption Key option, and then complete the wizard.

More Information: http://technet.microsoft.com/en-us/library/cc540390.aspx

Verify that you have a supported SQL Server collation on all databases and instances of databases.

To determine the SQL Server collation of a database, you can check the database properties. In SQL Server Management Studio, right-click the database you want to check, and then click Properties. The collation is listed under Maintenance.

More Information: http://support.microsoft.com/kb/958979

ALWAYS INSTALL THE SCOM 2012 ENVIRONMENT ON SQL WITH THE SQL_Latin1_General_CP1_CI_AS collation!

Pre-requisites

  • Read Mihai Sarbulescu’s post : Know issues when upgrading from OM 2007 R2 to OM 2012 
  • RMS, MS, Gw must run Windows Server 2008 R2 Sp1 or another supported version
  • All the DBs (OperationsManager, Datawarehouse, Reporting) must be hosted on a SQL Server 2008 R2 or another supported version.
  • .Net 4 must be installed on the RMS, MS and GW.
  • Report Viewer 2010 must be installed on the RMS, MS, GW.

Upgrade the secondary management servers.

Upgrade of the Management Server

Start the SCOM 2012 upgrade process by upgrading all the management servers (/!Not the RMS, only the MS). Let the agents connected to your MS during the upgrade process, otherwise, you will not be able to upgrade these agents via the SCOM Console after the MS upgrade and you will have to manually deploy the SCOM 2012 Agent to all the existing agents.

  1. Log on to the secondary management server with an account that is a member of the Operations Manager Administrators role for your Operations Manager 2007 R2 management group and a local administrator on the computer.
  2. From the System Center 2012 – Operations Manager media, run Setup.exe, and then click Install. The Getting Started page displays information about which features will be upgraded.

Note

If a web console exists on the secondary management server, it will be removed instead of upgraded. You have to re-install the web console after you upgrade the management group. For more information, see How to Install the Operations Manager Web Console. To minimize downtime, you can install the Operations Manager 2007 R2 web console on a stand-alone server.

Upgrading a secondary management server is just one phase of the distributed upgrade process. Upgrade is not completed until you have upgraded all of the other features in your management group, and have run upgrade on the management group itself. The next step is to upgrade any gateways.

More information: http://technet.microsoft.com/en-us/library/hh241296.aspx

  1. On the Getting Started, System Center 2012 – Operations Manager Upgrade page, click Next to proceed with the upgrade.

  1. On the Getting Started, Select installation location page, accept the default value of C:Program FilesSystem Center 2012Operations Manager, or type in a new location, or browse to one. Then click Next.

  1. On the Prerequisites page, review and address any warnings or errors that the Prerequisites checker returns, and then click Verify Prerequisites Again to recheck the system.

  1. If the Prerequisites checker does not return any warnings or errors, the Prerequisites, Proceed with Setup page appears. Click Next.

  1. On the Configuration, Configure Operations Manager accounts page, we recommend that you use the Domain Account option for the System Center Configuration service and System Center Data Access service accounts.

    Enter the credentials for a domain account, and then click Next.

  1. Review the options on the Configuration, Ready To Upgrade page, and then click Upgrade. The upgrade proceeds and displays the upgrade progress.

  1. When the upgrade is finished, the Upgrade complete page appears. Click Close. Be patient, the process is quite long.

Upgrade the push-installed agents.

Go to Administration > Pending Management and upgrade all the agents that need to be upgraded.

Upgrade the manual-installed agents

If you have manual-installed agents, (agents in DMZ, other domain …) you have to upgrade these agents manually.

Upgrade the other Management servers

You have to repeat these 3 following actions until you upgraded all you management servers and agents:

  • Upgrade the management server SCOM 2012
  • Upgrade the push-installed agent
  • Upgrade the manual-install agent

Upgrade the Gateway servers

Follow the same process than the management servers for the Gateway servers:

  • Upgrade the gateway server
  • Upgrade the push-installed agent
  • Upgrade the manual-install agent

Repeat these 3 steps for all the gateway servers.

Verify that your operational database has enough free space.

You must verify that the operational database has more than 50 percent of free space before you upgrade the management group because the upgrade might fail if there is not enough space. You should also ensure that the transactions logs are 50 percent of the total size of the operational database.

To check how much free space the Operational Database has

  1. On the computer that hosts the operational database, open SQL Server Management Studio.
  2. In the Object Explorer, expand Databases.
  3. Right-click the operational database, point to Reports, Standard Reports, and then click Disk Usage.
  4. View the Disk Usage report to determine the percentage of free space.


To increase the free space for the operational database and log files

  1. On the computer that hosts the operational database, open SQL Server Management Studio.
  2. In the Connect to Server dialog box, in the Server Type list, select Database Engine.
  3. In the Server Name list, select the server and instance for your operational database (for example, computerINSTANCE1).
  4. In the Authentication list, select Windows Authentication, and then click Connect.
  5. In the Object Explorer pane, expand Databases, right-click the operational database, and then click Properties.
  6. In the Database Properties dialog box, under Select a page, click Files.
  7. In the results pane, increase the Initial Size value for the MOM_DATA database by 50 percent.

Note   

This step is not required if free space already exceeds 50 percent.

  1. Set the Initial Size value for the MOM_LOG to be 50 percent of the total size of the database. For example, if the operational database size is 100 GB, the log file size should be 50 GB. Then click OK.

Verify the SQL Server Collation

SQL Server collation for all databases and database instances must be one of the following:

Language

Collation

English

SQL_Latin1_General_CP1_CI_AS

Run management group upgrade on the root management server.

To set the product key, use the Set-SCOMLicense cmdlet in PowerShell. To use the Set-SCOMLicense cmdlet you need to use elevated permissions. (Run as Administrator).

1. Open PowerShell as an Administrator
2. Load the OperationsManager Module (import-module operationsmanager)
3. Connect to your ManagementGroup (New-SCOMManagementGroupConnection)
4. Use Set-SCOMLicense -ProductId "yourlicensekey"
5. To check if changes were executed run Get-SCOMManagementGroup | ft skuforlicense, version, timeofexpiration –a

Note: This may require a reboot after running in order to register correctly.
More information: http://support.microsoft.com/kb/2699998

Upgrade or install the optional features, such as the web consoles, ACS and Reporting server.

ACS upgrade

/! You must be logged on and run the install process with the service account that you are using to connect to the ACS DB /!

/! You must be run the install process with the service account /!

How to Upgrade Reporting from Operations Manager 2007 R2

  1. Log on to the computer that hosts the Reporting server with an account that is a member of the Operations Manager 2007 R2 Administrators role for your Operations Manager 2007 R2 management group.
  2. On the System Center 2012 – Operations Manager source media, run Setup.exe, and then click Install.

  1. On the Getting Started, System Center 2012 – Operations Manager Upgrade page, review the features that will be upgraded. In this case, it is Operations Manager 2007 R2 Reporting. Click Next.

  1. On the Select installation location page, accept the default value of C:Program FilesSystem Center 2012Operations Manager, or type in a new location or browse to one. Then click Next.

  1. On the Prerequisites page, review and address any warnings or errors that the Prerequisites checker returns, and then click Verify Prerequisites Again to recheck the system.
  2. If the Prerequisites checker does not return any warnings or errors, the Prerequisites, Proceed with Setup page appears. Click Next.

  1. On the Ready to Upgrade page, review the options, and then click Upgrade.

  1. When upgrade is finished, the Upgrade complete page appears. Click Close.

Run SQL Query on each Management Group

Run the following SQL query on the Operational database in each management group to clean up the Localizedtext table and the Publishmessage table.

-- Create a temporary table to quickly find a PublisherId when you know the MessageId.
BEGIN TRY
CREATE TABLE #PublisherMessageReverseIndex(MessageStringId UNIQUEIDENTIFIER, 
   MessageId INT)
CREATE CLUSTERED INDEX #PublisherMessageReverseIndex_CI ON #PublisherMessageReverseIndex(MessageStringId)
INSERT INTO #PublisherMessageReverseIndex (MessageStringId, MessageId)
SELECT MessageStringId, MessageId
FROM dbo.PublisherMessages

-- Create a temporary table of message lengths, message IDs, and message hashes with the
-- MessageStringId to quickly determine whether a message is duplicated. Index the table. 

CREATE TABLE #LTHashStrings (MessageStringId UNIQUEIDENTIFIER, 
 LTValueLen INT, 
 LTValueHash VARBINARY(32),
 MessageId INT NULL)
CREATE CLUSTERED INDEX #LTHashStrings_CI ON #LTHashStrings(MessageStringId)
CREATE NONCLUSTERED INDEX #LTHashStrings_NCI1 ON #LTHashStrings(LTValueLen, MessageId, LTValueHash)

-- Create a temporary table for the orphaned PublisherStrings that you find. Orphaned PublisherStrings 
-- are rows in PublisherMessages whose corresponding events have already been groomed. They still
-- have corresponding rows in LocalizedText.  Do not add rows for PublisherMessages; they are not
-- for duplicated messages.

CREATE TABLE #OrphanedPublisherStrings (PublisherId UNIQUEIDENTIFIER, 
MessageStringId UNIQUEIDENTIFIER)
CREATE CLUSTERED INDEX #OrphanedPublisherStrings_CI ON #OrphanedPublisherStrings(MessageStringId)

-- Create a temporary table so that you can determine whether a PublisherMessages row still
-- has a corresponding event. These events do not have an index on the PublisherId, so do 
-- not query the EventAllView. If a PublisherId occurs multiple times in the event tables,
-- it is only needed one time in the temp table; therefore, the unique clustered index
-- must contain IGNORE_DUP_KEY. This keeps the temporary table relatively small and saves
-- time when you want to see the orphaned PublisherMessages.

CREATE TABLE #EventAllPublishers (PublisherId UNIQUEIDENTIFIER)
CREATE UNIQUE CLUSTERED INDEX #EventAllPublishers_CI ON #EventAllPublishers (PublisherId)
WITH (IGNORE_DUP_KEY = ON)

-- Populate the temporary table by scanning EventAllView one time.
INSERT INTO #EventAllPublishers(PublisherId) 
SELECT PublisherId 
FROM EventAllView

-- Populate the first temporary table to determine which messages are duplicated.
INSERT INTO #LTHashStrings (MessageStringId, LTValueLen, LTValueHash, MessageId)
SELECT LTStringId, len(LTValue), HashBytes('SHA1', LTValue), MessageId
FROM dbo.LocalizedText LT 
JOIN #PublisherMessageReverseIndex PM ON PM.MessageStringId = LTStringId

-- Create the second table to determine which messages are duplicated.  
CREATE TABLE #LTCountByMessage( LTValueLen INT, 
MessageId INT, 
LTValueHash VARBINARY(32), 
MsgCount INT)
CREATE CLUSTERED INDEX #LTCountByMessage_CI ON #LTCountByMessage(LTValueLen, MessageId, LTValueHash)

-- Populate second message for duplicate message detection by scanning the INDEX of
-- the first one and by doing a grouped count.
INSERT INTO #LTCountByMessage (LTValueLen, MessageId, LTValueHash, MsgCount)
SELECT LTValueLen, MessageId, LTValueHash, COUNT(1) 
FROM #LTHashStrings
GROUP BY LTValueLen, MessageId, LTValueHash

-- You are now set up to detect both orphaned PublisherStrings and duplicated messages
-- by joining to our relatively small (and correctly indexed) temporary tables.
-- Determine the OrphanedPublisherStrings that have duplicate messages.
INSERT INTO #OrphanedPublisherStrings (PublisherId, MessageStringId)
SELECT PM.PublisherId, PM.MessageStringId 
FROM dbo.PublisherMessages PM 
JOIN #LTHashStrings LTS ON (LTS.MessageStringId = PM.MessageStringId AND LTS.MessageId = PM.MessageId)
JOIN #LTCountByMessage LTC ON (LTC.LTValueLen = LTS.LTValueLen AND
LTC.MessageId = LTS.MessageId AND LTC.LTValueHash = LTS.LTValueHash)
WHERE PM.PublisherId NOT IN (SELECT PublisherId FROM #EventAllPublishers) AND
LTC.MsgCount > 1

-- Deleting all the OrphanedPublisherStrings and all the corresponding LocalizedText rows
-- at one time may be too large for the transaction log to handle.  Create a numbered
-- or ordered table so that you can delete them in relatively small batches and not
-- overtax the transaction log.
CREATE TABLE #NumberOrphanPublisherStrings(OrphanNum INT IDENTITY,
   PublisherId UNIQUEIDENTIFIER, 
   MessageStringId UNIQUEIDENTIFIER)
CREATE CLUSTERED INDEX #NumberOrphanPublisherStrings_CI on #NumberOrphanPublisherStrings(OrphanNum)

-- Populate the numbered table.
INSERT INTO #NumberOrphanPublisherStrings (PublisherId, MessageStringId)
SELECT PublisherId, MessageStringId FROM #OrphanedPublisherStrings
END TRY
BEGIN CATCH
GOTO Error
END CATCH

-- Set up variables so that you can delete the orphaned rows.
-- If the transaction log fills up, try to reduce the @OrphanIncrement value,
-- which controls the number of rows that are delete at the same time.
DECLARE @OrphanNum INT
DECLARE @OrphanIncrement INT
DECLARE @OrphanLimit INT
SET @OrphanNum = 0
SET @OrphanIncrement = 10000
SELECT @OrphanLimit = MAX(OrphanNum) FROM #NumberOrphanPublisherStrings
BEGIN TRY
WHILE @OrphanNum < @OrphanLimit
BEGIN
DELETE dbo.LocalizedText FROM
#NumberOrphanPublisherStrings OPS JOIN dbo.LocalizedText LT
ON LT.LTStringId = OPS.MessageStringId
WHERE OPS.OrphanNum >= @OrphanNum AND OPS.OrphanNum < @OrphanNum + @OrphanIncrement
DELETE dbo.PublisherMessages FROM
#NumberOrphanPublisherStrings OPS JOIN dbo.PublisherMessages PM
ON PM.PublisherId = OPS.PublisherId
WHERE OPS.OrphanNum >= @OrphanNum AND OPS.OrphanNum < @OrphanNum + @OrphanIncrement
SET @OrphanNum = @OrphanNum + @OrphanIncrement
END
END TRY
BEGIN CATCH
GOTO Error
END CATCH

Error:
IF @@ERROR <> 0
   SELECT 
        ERROR_NUMBER() AS ErrorNumber,
        ERROR_MESSAGE() AS ErrorMessage;

-- Try to drop all the temporary tables
BEGIN TRY
IF EXISTS (SELECT 1 FROM tempdb.INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME LIKE '#PublisherMessage%')
DROP TABLE #PublisherMessageReverseIndex
IF EXISTS (SELECT 1 FROM tempdb.INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME LIKE '#OrphanedPublisherStrings%')
DROP TABLE #OrphanedPublisherStrings
IF EXISTS (SELECT 1 FROM tempdb.INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME LIKE '#LTHashStrings%')
DROP TABLE #LTHashStrings
IF EXISTS (SELECT 1 FROM tempdb.INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME LIKE '#EventAllPublishers%')
DROP TABLE #EventAllPublishers
IF EXISTS (SELECT 1 FROM tempdb.INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME LIKE '#LTCountByMessage%')
DROP TABLE #LTCountByMessage
IF EXISTS (SELECT 1 FROM tempdb.INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME LIKE '#NumberOrphanPublisherStrings%')
DROP TABLE #NumberOrphanPublisherStrings
END TRY
BEGIN CATCH
   SELECT 
        ERROR_NUMBER() AS ErrorNumber,
        ERROR_MESSAGE() AS ErrorMessage;
END CATCH

Assign UNIX/Linux Agents to a Resource Pool

After completing the upgrade, UNIX/Linux agents must be assigned to a resource pool to enable highly-available monitoring and agent administration. For more information on creating resource pools, see How to Create a Resource Pool.

  1. Open the Operations console by using an account that is a member of the Operations Manager Administrators role for the om12short management group.

  2. In the Operations console, in the navigation pane, click the Administration button.

  3. In the Administration pane, under Device Management, click UNIX/Linux Computers.

  4. Select the UNIX/Linux computers to assign to a resource pool, and in the Actions pane, click Change Resource Pool.

  5. Complete the Change Resource Pool wizard to assign the computers to the selected resource pool.

UR3 installation

The update rollup 3 is available for Operations Manager 2012: http://support.microsoft.com/kb/2756127

We recommend that you install the update rollup package in the following order.

  • Install the update rollup package on the following server infrastructure:

  • Management server or servers

  • Gateway servers

  • Reporting servers

  • Web console server role computers

  • Operations console role computers

  • Manually import the management packs. (C:Program FilesSystem Center 2012Operations ManagerServerManagement Packs for Update Rollups)

  • Apply the agent update to manually installed agents, or push the installation from the Pending view in the Operations console.

For an SCOM 2012 Installation in English, please refer to the filename and GUID available in the table below:

TComponent

Architecture

Language

Appended GUID

Console 

amd 64

English 

755b85ba494fa5c83ca31cf40d38be5d6d0551ef

Consol

x86        

English 

74b1593272d3c45ca7a98b2a3e0d8dc2c3f795d6

Reporting

amd 64

English 

8043cc39d79514d1e633b645063100c136cf1f92

Web Console

amd 64

English 

2ef77d6ea1080b83c10351001dc13bf7e6977b7a



To manually install the update rollup packages, run the following command from an elevated command prompt:

msiexec.exe /update <PackageName>

For example, to install Update Rollup 3 for System Center Operations Manager 2012 (KB2750631), run the following command:

msiexec.exe /update KB2750631-AMD64-Server.msp

Conclusion

And voilà J your environment is upgrade to SCOM 2012.

Tweet about this on TwitterShare on FacebookShare on LinkedInShare on Google+Email this to someoneShare on TumblrPin on PinterestDigg thisShare on RedditFlattr the authorBuffer this pageShare on StumbleUpon

About Christopher Keyaert

Christopher Keyaert is a Consultant, focused on helping partners to leverage the System Center and Microsoft Azure cloud platform. He is also a Microsoft Most Valuable Professional (MVP) for Cloud and Data Center Management and a Microsoft Certified Trainer (MCT).
This entry was posted in Operations Manager. Bookmark the permalink.

2 Responses to Upgrade guide from SCOM 2007 to SCOM 2012

  1. Pingback: Upgrade to SCOM 2012 failed – SQL MPs involved | Christopher's System Center Blog

  2. Pingback: SCOM 2012: Overview link blog - SysManBlog

Leave a Reply

Your email address will not be published. Required fields are marked *