groupcache table does not have any records associated with target group

Document ID : KB000105814
Last Modified Date : 24/07/2018
Show Technical Document Details
The following query finds a list of servers associate with UserGroups and TargetGroups.
SELECT distinct as UserGroup, as [Target Group],g.dynamic,ts.hostname as HostName FROM groups g
INNER JOIN groupcache gc ON = gc.groupid
INNER JOIN account acc ON gc.objectid = acc.accountid
inner join targetapplication tap on acc.targetapplicationid=tap.targetapplicationid
inner join targetserver ts on tap.targetserverid=ts.targetserverid
INNER join usergroup_groups on
INNER join usergroups ug on
WHERE gc.classid='' and acc.deleted = '0' AND g.deleted = '0' and tap.deleted=0 and ts.deleted=0 and ='INTL - WINDOWS - DCA - INUATSUP'

The above query did not return any server. However from the Password Authority GUI we could see one server and 5 accounts when we clicked  the show button.
Password Authority
The query depends on the accuracy of the groupcache table.
After investigation we found that the groupcache table does not have any record for the group (searched by group id) .
Filter definitions for dynamic groups contained % characters. This prevented the groupcache table from being updated.
For example:  Hostname beginswith 'ABC%'  should be Hostname beginswith 'ABC'.