Yupp, that's the problem. The query results will reveal the computers that are only inside ca_discovered_hardware table as part of the results, however DSM Explorer will not display these systems in any groups, because they don't have a corresponding ca_agent record.
Normally, when a computer is deleted from DSM Explorer, the corresponding ca_discovered_hardware record is cleaned up. There are a few scenarios where this does not happen, or allowable scenarios where the ca_discovered_hardware record exists, without a ca_agent record. Off the top of my head...
a- The computer was discovered by NSM/CCS, but not yet managed by an ITCM agent.
b- Registration of Software Delivery profiles was turned on, and the ca_discovered_hardware record is referenced by BOTH the computer (ca_agent.agent_type=1) and the user profile (ca_agent.agent_type=4). Hence when deleting the computer, the ca_discovered_hardware record remains, because it is being referenced by the SD user profile.
Anyways, its probably best you remove these "orphaned" discovered hardware records from the database. We can use a simple delete script for this:
declare @uuid int
declare uid CURSOR for select dis_hw_uuid from ca_discovered_hardware where dis_hw_uuid not in (select object_uuid from ca_agent)
open uid
fetch next from uid into @uuid
while @@FETCH_STATUS=0
begin
delete from usd_applic where target=@uuid
delete from ca_group_member where member_uuid=@uuid
delete from ca_link_dis_hw_user where dis_hw_uuid=@uuid
delete from ca_server where dis_hw_uuid=@uuid
delete from ca_agent where object_uuid=@uuid
delete from ca_discovered_hardware where dis_hw_uuid=@uuid
fetch next from uid into @uuid
end
close uid
deallocate uid
That should do the trick!
-Brian