How data stores in sys_object_source table (SCCM)

Sathwik1
Tera Expert

How data stores in sys_object_source table (SCCM)

 

For SCCM, I'm not sure how data is getting stored in the sys_object_source table..

 

There are other tables..which acts as staging table and target tables.. but I'm unsure about sys_object_source table.

 

Can someone please help to understand about this table and how data comes to this table?

 

@Ankur Bawiskar 

1 REPLY 1

BeingKhan
Kilo Guru

 

1. What sys_object_source actually is (core concept)

In ServiceNow, sys_object_source is not a staging table and not a target table.

It is a metadata table used by Discovery, SCCM, and other CMDB integrations to track:

  • Where a CI came from

  • Which external system last updated it

  • Which import run / data source owns the CI

  • Whether a CI is authoritative or reconciled

Think of sys_object_source as the “lineage & ownership ledger” for CIs.

If staging tables answer “What data was imported?”
and CMDB tables answer “What data exists?”
then sys_object_source answers “Who owns this CI and why?”


2. Why SCCM uses sys_object_source

When SCCM sends data into ServiceNow, the platform must solve three hard problems:

  1. Duplicate prevention
    Multiple SCCM imports may refer to the same physical device.

  2. Source ownership
    SCCM, Discovery, Intune, manual updates — all may touch the same CI.

  3. Reconciliation
    Which source is allowed to overwrite which attributes?

sys_object_source exists specifically to support Identification & Reconciliation (IRE).


3. High-level SCCM data flow (where sys_object_source fits)

Here is the canonical SCCM → CMDB flow in ServiceNow:

SCCM
  ↓
MID Server
  ↓
Staging Tables (e.g. u_sccm_computers)
  ↓
Transform Map
  ↓
Identification Engine (IRE)
  ↓
CMDB Target Tables (cmdb_ci_computer, etc.)
  ↓
sys_object_source (metadata written here)

Key point:

Data does NOT flow through sys_object_source.
Data is written about the CI into sys_object_source.


4. When exactly is sys_object_source populated?

sys_object_source is populated only when the Identification Engine (IRE) runs successfully.

This happens when:

  • A Transform Map is configured to Use CMDB Identification

  • OR the IdentificationEngine.createOrUpdateCI() API is called

  • OR a Discovery / SCCM integration explicitly invokes IRE

SCCM integrations always use IRE — they never update CMDB tables directly.


5. What triggers the insert into sys_object_source?

During SCCM import:

  1. SCCM data lands in staging tables

  2. Transform Map executes

  3. Transform calls IRE

  4. IRE:

    • Identifies or creates the CI

    • Applies reconciliation rules

    • Creates or updates a sys_object_source record

So:

sys_object_source is written by IRE, not by the Transform Map script itself.


6. What data is stored in sys_object_source?

Each row represents a relationship between a CI and a data source.

Important columns:

Column Meaning

target_sys_idSys ID of the CI (e.g. cmdb_ci_computer)
target_tableCI table name
sourceData source (e.g. SCCM, Discovery)
source_nameHuman-readable source name
import_setImport Set sys_id
last_scanLast time SCCM updated this CI
last_discoveredLast successful reconciliation
statusActive / retired
confidenceConfidence score of the source

This table never stores actual CI attributes like name, serial number, RAM, etc.

It stores ownership and provenance metadata only.


7. Relationship with staging tables

Staging tables:

  • Temporary

  • Row-based

  • Exist per import run

sys_object_source:

  • Persistent

  • CI-based

  • Exists across imports

Example:

  • SCCM imports Device A today → creates CI → creates sys_object_source

  • SCCM imports Device A tomorrow → updates same CI → updates same sys_object_source row

So:

Staging tables are event-based
sys_object_source is state-based


8. Relationship with target CMDB tables

Target tables (e.g. cmdb_ci_computer) store the CI itself.

sys_object_source stores:

  • Which integration last updated it

  • Whether SCCM is authoritative

  • Whether Discovery can overwrite SCCM data

  • Whether the CI is orphaned

This enables:

  • Source precedence

  • CI lifecycle management

  • Conflict resolution


9. Why you may not “see” inserts directly

Common confusion points:

  • There is no Transform Map script inserting into sys_object_source

  • No Business Rule directly touches it

  • It is populated inside the IRE engine

  • Logging is internal unless debug is enabled

To confirm SCCM → sys_object_source linkage, query:

var src=new GlideRecord('sys_object_source');
src.addQuery('target_sys_id', '<ci_sys_id>');
src.query();
while (src.next()) {
  gs.print(src.source + ' | ' + src.last_scan);
}

10. How SCCM is identified as the source

SCCM integrations define:

  • Data Source

  • Discovery Source

  • IRE Source Name

These values are passed into IRE and written into sys_object_source.

That is why you’ll often see:

  • Source = SCCM

  • Source Name = Microsoft SCCM

  • Discovery Source = SCCM


11. What happens if sys_object_source is missing?

If this table is not populated:

  • Duplicate CIs will appear

  • Reconciliation fails

  • SCCM updates may overwrite Discovery incorrectly

  • CI lifecycle tracking breaks

This is why direct updates to CMDB tables are strongly discouraged.


12. Strong opinion (from experience)

If you are:

  • Writing custom SCCM transforms

  • Debugging “record updated but not reflected”

  • Seeing duplicate CIs

👉 Always inspect sys_object_source first, not the CMDB table

It tells the truth about:

  • Who owns the CI

  • Why updates did or did not apply

  • Whether IRE even ran

Ignoring it is how CMDBs quietly rot.


13. Practical debugging checklist for SCCM + sys_object_source

  1. Confirm Transform Map uses CMDB Identification

  2. Confirm Identification Rules match SCCM data

  3. Check sys_object_source for the CI

  4. Verify SCCM appears as source

  5. Check last_scan timestamp updates

  6. Validate reconciliation rules for attribute overwrite

  7. Confirm no manual updates bypassed IRE


14. Final mental model (keep this)

  • Staging tables = raw input

  • CMDB tables = current state

  • sys_object_source = ownership + provenance

  • IRE = the only gatekeeper

Once this clicks, SCCM integrations become predictable instead of mysterious.

 

Please mark the Answer as helpful and accept it as a Solution


 

MD SHADAB KHAN
CSA || CAD || CIS-DISCOVERY
PLEASE MARK THE ANSWER HELPFUL AND ACCEPT IT AS A SOLUTION IF YOU FIND IT HELPFUL & CORRECT