How to check what Configuration Policies are applied to which Machine/Group?

Document ID : KB000117133
Last Modified Date : 08/10/2018
Show Technical Document Details
Introduction:
From DSM Explorer is possible to check what Configuration Policy is applied to every Group or Agent, but this has to be done manually clicking on each Group or Machine in the environment, there is no way to check this globally from the GUI.
Question:
How to check what Configuration Policies are applied to which Machine/Group?
Answer:
The following query can re executed in order to do a match between Machine/Group and Configuration Policy:

select policy.dname, grp.dname
from csm_object policy
inner join csm_link link1 on policy.id=link1.child and policy.class=2000
inner join csm_object conf on link1.parent=conf.id
inner join csm_link link2 on link2.child=conf.id
inner join csm_object grp on grp.id=link2.parent

Having:

csm_class -- class definitions (e.g. 2000=policy, 200=group)
csm_link -- link table (between csm_objects, parent/child relationships)
csm_object -- configuration objects (organized by class)
csm_property -- properties relating to an object

Using the above definitions, the query can be modified in order to retrieve more information or add more columns.