APMSQL query was returning results from the MOM but not the Collector
The User running the query is an EEM or an LDAP user. However, the EEM/LDAP authentication is only configured on the MOM and not Collectors.
All supported APM releases.
As a workaround, copy the EM_HOME/config/domains.xml, users.xml and realms.xml files and any certificates needed for the EEM or LDAP server connection from the MOM to Collectors.
As an alternative, do not connect directly to the collector. Instead, get the same values from MOM which will authenticate and distribute properly. And then use a filter ("WHERE") to narrow the results only for that collector.