SCOM 2012: How to move databases – specially when you did an upgrade from SCOM 2007 R2 before

Microsoft upated the old technet entry with some of the steps I mentioned in my old blog entry. I had to update this one to reflect, what is still missing.

If you want to prepare the upgrade from System Center Operations Manager 2012 RTM to SP1 you perhaps also need to move the database(s) to another SQL server because the old system is not supported anymore (SP1 only supports SQL servers installed on Windows Server 2008 R2 and above!).

In this case you will try to follow the given procedures from Microsoft:
How to move the Operational Database http://technet.microsoft.com/en-us/library/hh278848.aspx
How to move the Data Warehouse Database http://technet.microsoft.com/en-us/library/hh268492.aspx

The problem is, that the documentation is missing some steps. And if you move a SCOM 2012 database which was upgraded before from SCOM 2007 R2 you will have different table names. The documentation only references the table names which are created during a fresh SCOM 2012 installation.

Additional: If you have installed the databases in named instances and/or use different ports than the standard ports, then you also need to enter that.

Assuming you have the following setup:

New database server:
OperationsManager database: SQLServer1\SQL1
OperationsManager DW database, ReportServer database, ReportServerTempDB: SQLServer1\SQL2

Here is the list of additional steps or differences you can follow:

OpsManager DB Move:

1. Perform on all management servers:

Open up regedit and change the entry of the following keys to 
\\HKLM\SOFTWARE\Microsoft\System Center\2010\Common\Database\DatabaseServerName
Value: SQLServer1\SQL1

\\HKLM\SOFTWARE\Microsoft\System Center\2010\Common\Database\DataWarehouseDBServerName
Value: SQLServer1\SQL2

2. Perform on OperationsManager database:

Change the entry of the field SQLServerName_6B1D1BE8_EBB4_B425_08DC_2385C5930B04 in the following table. If you upgraded from SCOM 2007 R2 before then use the SCOM 2007 R2 table name!

SCOM 2012 RTM: dbo. MT_Microsoft$SystemCenter$ManagementGroup
SCOM 2007 R2: dbo.MT_ManagementGroup

Value: SQLServer1\SQL1

Do not paste all 4 lines into your query. Perform them separated; otherwise you will get the error “Incorrect syntax near ‘sp_configure’.
First execute:
sp_configure ‘show advanced options’, 1
reconfigure
Then execute:
sp_configure ‘clr enabled’, 1
reconfigure

OpsManager DW Move:

1. Perform on Reporting Server:

Open up regedit and change the entry of the following keys to 

\\HKLM\Software\Microsoft\System Center Operations Manager\12\Reporting\DWDBInstance
Value: SQLServer1\SQL2

2. Perform on OperationsManager database.

Change the entry of the field MainDatabaseServerName_2C77AA48_DB0A_5D69_F8FF_20E48F3AED0F in the following table. If you upgraded from SCOM 2007 R2 before then use the SCOM 2007 R2 table name!

SCOM 2012 RTM: dbo. MT_Microsoft$SystemCenter$DataWarehouse
SCOM 2007 R2: dbo.MT_DataWarehouse

Value: SQLServer1\SQL2

So, if you have followed all steps explained in the Microsoft procedures and also checked the additional steps/information here, then your move should be successful.