This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Get the not Updated CIDs from Sophos Database

Hello,

I am trying to get informations regarding the not updated CIDs from Sophos Database.

These informations are available within an XML field in the SDDM_Servers tables.

I am trying to extract these informations but in vain.

Did any one tried this before?

here is my SQL Query:

"

declare @CID table
(
CIDName varchar(100),
DeliveryResult varchar(100),
LastUpdate varchar(100)
)
declare @DeliveryResult varchar(50)
declare @lastNonNullDeliveryAt varchar(50)
declare @myDoc XML

declare @SUM varchar(50)
Set @SUM = 'xxx'
Set @myDoc = (select [StatusXML] from [SOPHOS550].[dbo].[SDDMServers] where LastName like @SUM)
select @myDoc
declare @test varchar(100)
set @test = @myDoc.value('(//status/updateManager/distributionGroup/distribution/distributionSite/unc/@uri)[10]','varchar(100)')
select @test

insert into @CID  (CIDName,DeliveryResult,LastUpdate)
SELECT
cidstatut.uri.value('(@uri)[1]','varchar(100)'),
statut.cidSate.value('(@deliveryResult)[1]','varchar(100)'),
statut.cidSate.value('(@lastNonNullDeliveryAt)[1]','varchar(100)')
FROM  @myDoc.nodes('/status/updateManager/distributionGroup/distribution') statut(cidSate)
cross apply statut.cidSate.nodes('/distributionSite/unc') as cidstatut(uri)
where cidSate.value('@deliveryResult','varchar(100)') not like 'NullSuccess%'

select * from @CID

"

Thank you for your help



This thread was automatically locked due to age.