I needed to get the list of my reports and what data source and dataset they use. use ReportServer; WITH XMLNAMESPACES ( DEFAULT ‘http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition’, ‘http://schemas.microsoft.com/SQLServer/reporting/reportdesigner’ AS rd ) SELECT distinct ReportName = name ,DataSetName = x.value(‘(@Name)[1]’, ‘VARCHAR(250)’) ,DataSourceName = x.value(‘(Query/DataSourceName)[1]’,’VARCHAR(250)’) ,CommandText = x.value(‘(Query/CommandText)[1]’,’VARCHAR(250)’) FROM ( SELECT C.Name,CONVERT(XML,CONVERT(VARBINARY(MAX),C.Content)) AS reportXML FROM ReportServer.dbo.Catalog C WHERE C.Content is …