# How can I tell which data sources are being used in SSRS?

We have a bunch of SSRS (2008) reports deployed to our web portal. We have edited some of the reports to use a shared data source different than the one with which it was originally deployed.

I am looking for a way to query the ReportServer database to show me which reports use which of these shared data sources. I found that you can use the XML data stored in Catalog.Content to show what data source is being used, but this appears to the data source with which the report was originally deployed.

## migrated from stackoverflow.comOct 17 '11 at 15:17

This question came from our site for professional and enthusiast programmers.

• I can't do a full answer, but you should be able to find it in ReportServerDB: there is an Item (?) table that contains all entities. And some link between a report and datasource item. Good hunting! – gbn Oct 17 '11 at 16:44
• Thanks, gbn, but that's exactly what I can't find: the link between the catalog and datasource tables... there is no item table... – JHFB Oct 17 '11 at 17:28
• And, after close examination, I don't even think the shared data sources are in the datasource table. The plot thickens. – JHFB Oct 17 '11 at 17:29

I distilled that information to this query:

select
Catalog.name,
cat1.Name datasource
from
Catalog
join DataSource
on Catalog.ItemID = DataSource.ItemID
join Catalog cat1