The CreatorCon Call for Content is officially open! Get started here.

SCCM and ServiceNow

nataliya_b
Tera Guru

Hello All

Our SCCM got updated to 1906, that made our ServiceNow Remove Software import stopped working (plugin SCCM 2012 v2 activated)

This SQL query does not bring any records. 

SELECT * FROM

(SELECT

MachineID as ResourceID,
InstanceKey + 32000000 as GroupID,
DelDate

FROM SCCM_Ext.Add_Remove_Programs_DATA_DD

UNION

SELECT
MachineID as ResourceID,
InstanceKey +64000000 as GroupID,
DelDate

FROM SCCM_Ext.Add_Remove_Programs_64_DATA_DD)t

 

We tried to use following query, but data validation results are not consistent. 

SELECT * FROM

(SELECT

MachineID as ResourceID,
InstanceKey + 32000000 as GroupID,
TimeKey as DelDate

FROM dbo.Add_Remove_Programs_DATA

UNION

SELECT
MachineID as ResourceID,
InstanceKey +64000000 as GroupID,
TimeKey as DelDate

FROM dbo.Add_Remove_Programs_64_DATA)t

 

Does anyone have similar issue? Are we using correct tables in new query? 

Please help.

1 ACCEPTED SOLUTION

nataliya_b
Tera Guru

 

Just would like to give the summary for this, in case anyone would have the issue in the future


If your SCCM gets upgraded to 1906 and your ServiceNow stops getting removed software records - possible cause - deactivated triggers (due to upgrade) in SCCM db.
These triggers shall be activated and running
tr_Add_Remove_Programs_DATA_DD,  tr_Add_Remove_Programs_DATA_64_DD

for ServiceNow to receive removed software records.


The ServiceNow SCCM set up remains the same, no changes.

View solution in original post

21 REPLIES 21

Community Alums
Not applicable

Hello,

We're also having the same issue. Have you managed to resolve it?

Hello Reece

We were advised (by our sccm team) to use views instead of tables, thus our SQL for removed software looks like below

SELECT * FROM

(
SELECT

ResourceID,
GroupID + 32000000 as GroupID,
TimeStamp as DelDate

FROM v_GS_ADD_REMOVE_PROGRAMS

UNION
SELECT
ResourceID,
GroupID + 64000000 as GroupID,
TimeStamp as DelDate

FROM v_GS_ADD_REMOVE_PROGRAMS_64 )t

 

We are still in the "testing and validating data mode". Cannot guarantee it is the proper approach.

 

Community Alums
Not applicable

Hi Nataliya,

 

That's actually worked great for us. I had to change from (AI) to regular software imports but that't not a massive issue.

I'll update you if I find any other issues.

Reece

Community Alums
Not applicable

Hello,

Is this solution still working for you? It seemed to work for the first import, but subsequent imports are no longer removing software.

hi Reece

Data validation results were very inconsistent. Removed software (in the past) were not removed from SNOW.

We sat new SQL (in SCCM 2016 Removed Software data source) today.

This historical view has entries for the past SCCM removed software.

I will be validating results tomorrow.

If you could test this query below in your system and share your results, that would be great.

thank you

Nataliya

SELECT * FROM

(SELECT
ResourceID,
GroupID + 32000000 as GroupID,
TimeStamp as DelDate,DisplayName0, AgentID
FROM v_HS_ADD_REMOVE_PROGRAMS

UNION ALL

SELECT
ResourceID,
GroupID + 64000000 as GroupID,
TimeStamp as DelDate,DisplayName0, AgentID

FROM v_HS_ADD_REMOVE_PROGRAMS_64

M)t WHERE AgentID is NULL