Why Dynamic CI groups with saved query is not synced to svc_ci_assoc table

TamásU
Tera Contributor

I have a saved query created viw CMDB Query Builder which is used in a CMDB group that is used in a Dynamic CI group. CIs found via this saved query does not sync to the svc_ci_assoc table. If I add a few CIs manually to the dynamic CI groups those CIs are synced to svc_ci_assoc within a few minutes.

 

Any idea why is that?

pr8172510
Tera Guru

Hi @TamásU,

 Dynamic CI Group membership and svc_ci_assoc population are separate processes.

A CI being returned by a CMDB Query Builder saved query and included in a Dynamic CI Group does not automatically create records in svc_ci_assoc.

       check

  • Verify the Dynamic CI Group refresh job has completed successfully.
  • Confirm the CIs are actually present in the Dynamic CI Group membership.
  • Verify the Application Service / Service Mapping association process has run successfully.
  • Check scheduled jobs and logs related to service association updates.

Since manually added CIs are appearing in svc_ci_assoc, the issue is likely that query-based membership alone does not trigger service-to-CI association creation, which is expected behavior in many Service Mapping scenarios.

Thanks, I checked all 4 points but they are fine. 

Yogesh11bhatt
Kilo Guru

Hi @TamásU ,

 

This is a specific architectural behavior caused by how the platform handles CMDB Group populations differently for queried versus manual CIs. Additionally, there is a known platform defect in recent releases that exactly matches your symptoms.

Here is the technical breakdown of why this is happening and how to resolve it:

1. The Known Defect (PRB1952766)

If your instance is currently on the Zurich release (or a recent patch), there is a documented platform defect where Saved Queries built via the CMDB Query Builder fail to populate the svc_ci_assoc table.

  • The Cause: Zurich introduced a new execution engine for CMDB queries ("v2" mode). When a Dynamic CI Group relies on a Saved Query running in v2 mode, the background API (CMDBGroup) fails to return the query results to the association engine, resulting in zero records syncing to svc_ci_assoc.

  • Why Manual CIs Still Work: When you manually add a CI, it gets stored directly in the cmdb_group_contains_ci table. This bypasses the Query Builder execution engine entirely, which is why manual additions sync successfully while the dynamic query fails.

  • The Fix / Workaround: Navigate to your System Properties (sys_properties.list) and search for glide.cmdb.query.execution_mode. Change the value from v2 to v1. Once updated, manually trigger your Dynamic CI Group recalculation or wait for the scheduled job, and the queried CIs will successfully sync.

2. Event-Driven vs. Scheduled Architecture

Even if you are not encountering the v2 bug, it is important to understand that Saved Queries and Manual CIs trigger the association sync differently by design:

  • Manual Additions (Event-Driven): Adding a CI manually inserts a record into the database, which immediately triggers business rules to queue the synchronization. This usually updates svc_ci_assoc within minutes, exactly as you observed.

  • Saved Queries (Scheduled): A Saved Query is dynamic. The platform cannot continuously monitor every underlying table in a complex Query Builder structure for changes in real-time. Instead, it relies on scheduled jobs (specifically "Update svc_ci_assoc and Error Counters" or "CMDB Group CI Sync") to periodically execute the query, evaluate the results against the group, and push updates to svc_ci_assoc.

  • Troubleshooting: If the v1 workaround does not immediately resolve the issue, verify that these specific CMDB/CSDM scheduled jobs are active and running on their intended intervals in your environment.

Hope this helps clarify the platform behavior and points you toward the fix!

 

Please mark this answer as Helpful if it resolves your question. 🙂

 

Thanks,

Yogesh Bhatt

Thanks! I reviewed the problem and the corresponding kb. Changed the glide.cmdb.query.execution_mode to v1 but no luck so far. The strange thing is that the kb (Calls to QueryBuilder for population of Service CIs and Global Search return no CMDB results when ex...) claims that Zurich Patch 6 fixes it and we already are on Patch 9. 
Not sure if a node restart would help as stated in the knowledge.