0

I've been using ReportingServicesTools, a powershell tool for managing SSRS to migrate from a 2016 SSRS server to an SSRS 2022 server. Reports came over, datasources came over, yet every report gives this error:

The report server cannot process the report or shared dataset. The shared data source 'Name' for the report server is not valid. Browse to the server or site and select a shared data source. (rsInvalidDataSourceReference)

If I manually feed the report the DataSource in the Manage menu it works, but there's about 100 reports to do this on.

I've used Write-RsFolderContent to upload a bulk download of the reports from the old server. Everything is there except Subscriptions, but every report gives me the same error that the shared Datasource isn't there. The datasources are there, in the same folder path they were on the old server. I restored the encryption key from the old server, still nothing.

I'm not sure what happened differently, but I imported reports from this same server to this same new server before without this issue. I had to refresh the set of reports so I imported them all recursively again, and now the datasource error occurs.

I also tried this (old) fix updating the datasources table but no dice.

    USE [ReportServer]
GO

UPDATE [dbo].[DataSource]
SET [Link] = (SELECT TOP 1 [ItemID] FROM [dbo].[Catalog] where name = [dbo].[DataSource].[Name])
WHERE name is not null and link is null

Anything I can do to reconnect these reports to their datasources without going the manual way?

2
  • Open a report in VS. View code. Find the GUID in report. Does it exist in new DB? Commented Mar 11 at 23:05
  • I've done a search an replace on GUID's via VS. It may be possible to update the report definition XML and replace in bulk. But not sure if that's a good idea or not. Commented Mar 11 at 23:08

1 Answer 1

0

You will need to use Set-RsSharedDataSource to change the datasource for each report; something like this :

Set-RsSharedDataSource -ReportServerUri XXX -DataSourceName DSx -DataSourcePath /foldername -Path '/foldername/NameofReport';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.