Last active
December 17, 2015 20:59
-
-
Save kristinaconley/5671319 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE ReportServer | |
/*Data Sources used in Reports*/ | |
SELECT | |
S.name AS 'Report Name' | |
,C.Name AS 'DataSource' | |
FROM dbo.[Catalog] S (NOLOCK) | |
INNER JOIN DataSource DS (NOLOCK) ON (s.ItemID = DS.ItemID) | |
INNER JOIN dbo.[Catalog] C (NOLOCK) ON (DS.Link = C.ItemID) | |
WHERE | |
S.Type = 2 --Type 2 is Report | |
ORDER BY 1 | |
/*Data Sources used in Subscriptions*/ | |
SELECT | |
C.name | |
,S.Description | |
,C1.Name datasource | |
FROM dbo.Subscriptions S (NOLOCK) | |
INNER JOIN DataSource DS (NOLOCK) ON (S.SubscriptionID = DS.SubscriptionID) | |
INNER JOIN Catalog C1 (NOLOCK) ON (DS.Link = C1.ItemID) | |
INNER JOIN dbo.Catalog C (NOLOCK) ON (C.ItemID = S.Report_OID) | |
WHERE | |
C.Type = 2 --Type 2 is Report | |
ORDER BY 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment