Error with SRSUpgradeTool.exe /PostUpgrade when attempting to upgrade an OpsMgr R2 SQL 2005 Reporting Server installation to SQL 2008

fixWhen following the steps of this article, https://technet.microsoft.com/en-us/library/dd789004.aspx, in order to upgrade your SQL reporting server from SQL 2005 to SQL 2008, you may encounter the problem described below.

In step 4 you run SRSUpgradeTool /PostSQLUpgrade and receive the following error:

D:\SupportTools\i386>srsupgradetool.exe /InstanceName:MSSQLSERVER /Action:PostSQLUpgrade
Microsoft System Center Operations Manager 2007 R2 -- Upgrade SQL Reporting Server Preparation Tool
(C) Copyright 2000-2006 Microsoft Corp.

getSQLInstanceVersion: SRS Server is: XXXX.
getSQLInstanceVersion: SRS Instance is: MSSQLSERVER
getSQLInstanceVersion: Actual SRS reg location is: SOFTWARE\Microsoft\Microsoft
SQL Server\MSRS10.MSSQLSERVER\Setup
SQL Instance reg location is MSRS10.MSSQLSERVER
SRS version is 10.0.1600.22
SRS Report Server folder is C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\.
Error: Failed while updating registry entry for reporting code MSI component

We have investigated and discovered there is a problem with the tool that may result in this error. We are currently working on correcting this and will release an updated tool shortly.

In the meantime, when you arrive at this point in the process, you can run the script below to carry out the task the tool was intended to complete at this stage.

Two VERY IMPORTANT points to note about this, if you have a 32-bit version of SQL installed on a 64 bit operating system then you will also need to edit the following line in the script to point to the correct registry location for the installation:

strRegBase = "HKLM\SOFTWARE\ Wow6432Node\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\"

Also verify the location you have installed SQL 2008 Reporting Services to, and edit the following line if necessary.

strSRSbinFolder = "c:\program files\microsoft sql server\msrs10.mssqlserver\reporting services\reportserver\bin\"

Then save this script as a .vbs and run it to update the necessary registry keys:

'=====================================================================================================

Option Explicit
Dim arrRegStrings(6,1)
Dim strRegBase, strR2Key, strSRSBinFolder
Dim I
Dim objShell, objFSO
strRegBase = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\"
strR2Key = "C774AFD18AAA3114EBCA5E953978F85A"
strSRSBinFolder = "c:\program files\microsoft sql server\msrs10.mssqlserver\reporting services\reportserver\bin\"
arrRegStrings(0,0) = "7AB1BACE5F90C6047890E5A6EB081BD0"
arrRegStrings(0,1) = "Microsoft.EnterpriseManagement.Reporting.Code.dll"
arrRegStrings(1,0) = "D501522B1B6B9414CBAE65864C764271"
arrRegStrings(1,1) = "Microsoft.EnterpriseManagement.Reporting.Security.dll"
arrRegStrings(2,0) = "5AC8C0B2A77020E49924D2CF21976972"
arrRegStrings(2,1) = "MicrosoftRSChart.dll"
arrRegStrings(3,0) = "E983A6E6D27CA9A418F41317865692B3"
arrRegStrings(3,1) = "Datawarehouse.RC1.Upgrade.sql"
arrRegStrings(4,0) = "F1B8973016D3BDC4D8746A17464A3B40"
arrRegStrings(4,1) = "MicrosoftRSChartDesigner.dll"
arrRegStrings(5,0) = "CE0F03E70BC70A14185846E5E5A7C412"
arrRegStrings(5,1) = "Datawarehouse.SP1.Upgrade.sql"
arrRegStrings(6,0) = "C1E0F4463F705934CB07176DACAA4393"
arrRegStrings(6,1) = strSRSBinFolder
set objShell = createobject("WScript.Shell")
'Do regpath check
On Error Resume Next
objShell.RegRead strRegBase & arrRegStrings(0,0) & "\"
If Err then
WScript.Echo "Base Registry Path incorrect please edit strRegBase to point to the correct registry location"
WSCript.Quit 1
End If
On Error Goto 0
'Do filepathcheck
Set objFSO = CreateObject("Scripting.FileSystemObject")
If Not(objFSO.FolderExists(strSRSBinFolder)) then
WScript.Echo "SRS Install binary path incorrect. Please edit strSRSBinFolder to point to the correct folder location"
WSCript.Quit 1
End If
On Error Goto 0
For I = 0 to UBound(arrRegStrings)
objShell.RegWrite strRegBase & arrRegStrings(I,0) & "\" & strR2Key, strsrsbinFolder & arrRegStrings(I,1), "REG_SZ"
Next
WScript.Echo "Finished Registry Updates"

'=====================================================================================================

Brian McDermott | Escalation Engineer