Freigeben über


Migration of a Content Database containing Reporting Services WebParts

Reporting Services report servers can be installed in SharePoint mode and integrated with a SharePoint deployment. Not all features are supported in all combinations of report server, Reporting Services add-in for SharePoint, and SharePoint Products. To find the supported combination, you can review the following TechNet article: https://msdn.microsoft.com/en-us/library/gg492257.aspx

I recently had to assist a customer to migrate some content databases from a SharePoint 2010 environment to a SharePoint 2013 environment.

The source environment:

  • Windows Server 2008 R2
  • SharePoint Server 2010 (with Reporting Services 2008 R2 Add-in)
  • SQL Server 2008 R2
  • Reporting Services 2008 R2 (SharePoint Integrated mode)

The destination environment:

  • Windows Server 2012 R2
  • SharePoint Server 2013 (with Reporting Services 2012 Add-in)
  • SQL Server 2012
  • Reporting Services 2012 (SharePoint Integrated mode)

The migration was done by using the Content Database detach/attach procedure. Before attaching the database to the new environment we executed “Test-SPContentDatabase” and get the following error:

WebPart class [ab6d9dad-e23c-ce4f-ff98-f6575a1ccf4c] (class [
                  Microsoft.ReportingServices.SharePoint.UI.WebParts.ReportView
                  erWebPart] from assembly
                  [Microsoft.ReportingServices.SharePoint.UI.WebParts,
                  Version=10.0.0.0, Culture=neutral,
                  PublicKeyToken=89845dcd8080cc91]) is referenced [4] times in
                  the database [WSS_Content], but is not installed on
                  the current farm. Please install any feature/solution which
                  contains this web part.

The Microsoft.ReportingServices.SharePoint.UI.WebParts in version=10.0.0.0 is reported as missing because this WebPart is brought by the Reporting Services 2008 R2 Add-in which is a version that is not supported on a SharePoint 2013 environment. On the destination environment, the Reporting Services 2012 Add-in was deployed and the version of the WebPart that was added to the GAC is 11.0.0.0.

If you ignore the warning and attach the database to the SharePoint 2013 environment, when a user access to a page containing a Reporting Service WebPart, the WebPart will not be visible and the following error will be logged in the ULS logs:

An unexpected error has been encountered in this Web Part. Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type Microsoft.ReportingServices.SharePoint.UI.WebParts.ReportViewerWebPart, Microsoft.ReportingServices.SharePoint.UI.WebParts, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91 could not be found or it is not registered as safe

In order to allow the user to view the reports displayed via the ReportingServices WebPart, the WebPart references on the pages need to be updated in the SharePoint 2013 environment. This update consists in replacing the version 10.0.0.0 of the WebPart by the version 11.0.0.0.

Two options allow to do the update:

  • On the SharePoint 2013 environment remove the old WebParts and add instances of the new version of the WebPart (then reconfigure the WebParts).
  • On the SharePoint 2010 environment, update the references of the Reporting Services WebParts to reference the version 11.0.0.0 instead of the version 10.0.0.0.

Option n°1

The first option consists in attaching the Content Database to the SharePoint 2013 environment (warnings are ignored), and remove the references to WebParts in version 10.0.0.0, then to add the new version of the WebParts and reapply the same configuration as for the WebPart that was removed.

1. Restore a SQL Server Backup of the Content Database to migrate on a test environment

2. On this database, execute the following query: select * from WebParts WITH (NOLOCK) where tp_WebPartTypeId = 'ab6d9dad-e23c-ce4f-ff98-f6575a1ccf4c'

3. For each result returned, execute the following query after updating the value of tp_PageURLID in order to find the URLs of the pages containing Reporting Service WebParts : select * from AllDocs WITH (NOLOCK) where id = '<tp_PageURLID>'

4. Migrate the Content Database to SharePoint 2013 environment by using the database detach/attach method

5. On the SharePoint 2013 environment connect to all URLs identified previously. Add at the end of the URL “?contents=1” in order to be able to remove the old version of the WebPart, then add again the WebPart to the page, and apply the same configuration as previously, finally check the page in.

Option n°2

The second option consists in updating the references of the Reporting Services WebParts in the SharePoint 2010 environment, then to detach/attach the Content Database to the SharePoint 2013 environment.

1. Installation of the SQL 2012 Reporting Services Add-in on the SharePoint 2010 environment

After installation of the Add-in the following elements are added to the Web.config of the Web Applications:
<SafeControl Assembly="Microsoft.ReportingServices.SharePoint.UI.WebParts, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" Namespace="Microsoft.ReportingServices.SharePoint.UI.WebParts" TypeName="*" Safe="True" />

<dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
        <assemblyIdentity name="Microsoft.ReportingServices.SharePoint.UI.WebParts" publicKeyToken="89845dcd8080cc91" culture="neutral" />
        <bindingRedirect oldVersion="10.0.0.0" newVersion="11.0.0.0" />
</dependentAssembly>

The dependentAssembly section allows to specify that the DLL in version 11.0.0.0 must be loaded when the version 10.0.0.0 is called.

2. In order to update the references to the Reporting Services WebParts in the Content Database, it is needed to do a check-out / check-in on all pages containing this WebPart. To identify the pages, you can use the same steps as described in the option n°1.

3. Detach the database from the SharePoint 2010 environment and attach it to the SharePoint 2013 environment.

 

Warning: If in you Content Database you have multiple versions of the pages containing the Reporting Services WebPart, the Test-SPContentDatabase command will continue to display warning as the old version of the WebPart will still be referenced in the older versions.

Thanks to Dominique VIVES for having reviewed my post.

Matthieu RUNTZ

Comments

  • Anonymous
    December 06, 2017
    Thanks :))