List all Shared Data Sources | SansSQL

Monday, June 20, 2016

List all Shared Data Sources

Here is a handy script to list all the Shared Data Sources from the ReportServer Database.
WITH BasicData AS 
(
SELECT CONVERT(VARBINARY(MAX),Content) AS Content,
[Catalog].Name,[Path],ConnectionString FROM [Catalog] INNER JOIN DataSource
ON [Catalog].ItemID=DataSource.ItemID
WHERE [Type]=5 -- Type=5, Filters Shared Data Sources
)
,DataWithXML AS
(
SELECT 
Name, [Path], CONVERT(XML,Content) AS ContentXML 
FROM BasicData
)
SELECT Name, [Path], ConnectionString.value('(text())[1]','nvarchar(max)') AS ConnectionString
FROM DataWithXML 
CROSS APPLY DataWithXML.ContentXML.nodes('//*:ConnectString') AS ConnectionStrings(ConnectionString)

4 comments:

Suseela Susiee said...

Truly a very good article on how to handle the future technology. After reading your post,thanks for taking the time to discuss this, I feel happy about and I love learning more about this topic.


SEO Company in Chennai

Aashi siva said...

It is really a great and useful piece of info. I’m glad that you shared this helpful info with us. Please keep us informed like this. Thank you for sharing.

J2ee Training in Chennai Adyar

Sathya G said...

Thanks you for sharing the unique content. you have done a great job. thank you for sharing such a unique content.
Informatica Training in Chennai Adyar

Redford Brown said...

Hi author, great share. I've just started learning to code and this particular post might come handy in the future. For that i am following your site regularly. Best of regards from EvoEssay.com hope you could visit us too when you're free.

Post a Comment