Skip to content

Commit 2969876

Browse files
authored
Add creator username ⛵
1 parent fff32e3 commit 2969876

1 file changed

Lines changed: 27 additions & 4 deletions

File tree

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
1-
SELECT Name,
2-
Link,
3-
ItemID
4-
FROM [ReportServer].[dbo].[DataSource]
1+
SELECT
2+
U.UserName AS Creator_Username,
3+
C2.Name AS Data_Source_Name,
4+
C.Name AS Dependent_Item_Name,
5+
C.Path AS Dependent_Item_Path
6+
FROM
7+
ReportServer.dbo.DataSource AS DS
8+
INNER JOIN
9+
ReportServer.dbo.Catalog AS C
10+
ON
11+
DS.ItemID = C.ItemID
12+
AND
13+
DS.Link IN (SELECT ItemID FROM ReportServer.dbo.Catalog
14+
WHERE Type = 5) -- Type 5 identifies data sources
15+
FULL OUTER JOIN
16+
ReportServer.dbo.Catalog C2
17+
ON
18+
DS.Link = C2.ItemID
19+
LEFT JOIN
20+
ReportServer.dbo.Users AS U
21+
ON
22+
C.CreatedByID = U.UserID
23+
WHERE
24+
C2.Type = 5
25+
ORDER BY
26+
C2.Name ASC,
27+
C.Name ASC;

0 commit comments

Comments
 (0)