SQL query to list info of a particular agent from the ca_discovered_hardware table in the 'mdb'.

Document ID : KB000026437
Last Modified Date : 14/02/2018
Show Technical Document Details


Sometimes there may be a need to diagnose problems with a registered agent when it does not function properly.
The following SQL query can be used to compare the attributes of an agent like HostUUID, Hostname, MAC Address, etc., from the ? mdb ?
with the attributes of the agent displayed in the DSM Explorer.



Is there a SQL Query that lists the info about a particular agent from ca_discovered_hardware ?



CA Client Automation - All versions




use mdb
select * from ca_discovered_hardware where host_name like '<hostname>'


Example: select *from ca_discovered_hardware where host_name like 'testagent'

(The above query needs to be run against the database 'mdb' in SQL Query Analyzer)


You can also run the following command which will show you more information about the agent.

use mdb 
select  * from ca_agent where agent_type =1 and agent_name like '<hostname>'
*Note:   where agent_type =1 will only list machines


There is more hardware information in inv_generalinventory_item and the software information is in ca_discovered_software 


**Note: ca_agent is linked to ca_discovered_hardware and without a record in that table the asset will still not show up in the DSM Explorer at all.