using SQL scripts what would we write to find the shared data source reference (highlighted in green) as well as the name in the blue box in SSRS rdl files?
I am looking for a list to pull all the report names, the data source names (in blue box) and the actual data source reference (in the green box) on the server that is used. There is a lot of overlap of names used and we need to clean up reports. (there are too many to do this manually).
Answer can be found here: Listing all Data Sources and their Dependencies (reports, items, etc) in SQL Server 2008 R2
SELECT
C2.Name AS Data_Source_Name,
C.Name AS Dependent_Item_Name,
C.Path AS Dependent_Item_Path
FROM
ReportServer.dbo.DataSource AS DS
INNER JOIN
ReportServer.dbo.Catalog AS C
ON
DS.ItemID = C.ItemID
AND
DS.Link IN (SELECT ItemID FROM ReportServer.dbo.Catalog
WHERE Type = 5) --Type 5 identifies data sources
FULL OUTER JOIN
ReportServer.dbo.Catalog C2
ON
DS.Link = C2.ItemID
WHERE
C2.Type = 5
ORDER BY
C2.Name ASC,
C.Name ASC;