Hi @Sravanthi Godavarthy,
Please try with below code.
WITH ItemContentBinaries AS
(
SELECT
Name
, Type
, CONVERT(VARBINARY(MAX), Content) AS Content
FROM ReportServer.dbo.Catalog
WHERE Type = 2
)
, ItemContentNoBOM AS (
SELECT
Name
, CASE WHEN LEFT(Content, 3) = 0xEFBBBF THEN CONVERT(VARBINARY(MAX), SUBSTRING(Content, 4,LEN(Content)))
ELSE Content
END AS Content
FROM ItemContentBinaries
)
, xmlcontent as (
SELECT
Name AS DataSourceName
, CONVERT(xml, Content) AS ContentXML
FROM ItemContentNoBOM
)
Select
DataSourceName
, ContentXML
,ContentXML.value('(//*[local-name()="ConnectString"])[1]', 'nvarchar(max)')
from xmlcontent
Regards,
Zoe Hui
If the answer is helpful, please click "Accept Answer" and upvote it.