This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.
BMC Client Management
Any version of BCM
How to Find the Devices with same GUID in case of device name got changed using sql query.
Run the following queries against your database. Note that you might need to edit them to reflect the owner of your database first. These queries will list every device that is identified as a duplicate by the master. Every device guid that appears in the results of these queries will have to be blacklisted in the system variables.
Warning: these queries will list all duplicate GUID issues from the table. This table might have a lot of history and you might find GUID issues that have actually been solved since then (check the settings in Gloval Settings > System Variables > Event management. This is why you might want to edit it to add a date to not to look after.
- Run the following query that relates to the type of database your master uses:
- Shared MS sql Query to find the duplicate GUID and duplicate devices:
SELECT d.DeviceID ,d.DeviceName as Current_Name ,substring (description,2,charindex('}',description)-2) as Prior_Name ,d.GloballyUniqueID ,min(elog.IntegrationDate) as min_eventdate ,max(elog.IntegrationDate) as max_eventdate ,COUNT(eventlogid) as NumberOfChanges from bcmdbuser.EvLog_ObjType_710 elog join bcmdbuser.Devices d on d.DeviceID=elog.DeviceID where EventType='_DB_EVENTTYPE_DEVICENAME_CHANGE_ENUM_' and d.DeviceName <> substring (description,2,charindex('}',description)-2) and d.TopologyType in ('_DB_DEVTYPE_CLIENT_','_DB_DEVTYPE_MASTER_','_DB_DEVTYPE_RELAY_') group by d.deviceid ,d.DeviceName ,d.TopologyType ,d.GloballyUniqueID ,substring (description,2,charindex('}',description)-2) having count(elog.eventlogid) > 1 order by numberofchanges desc;
For ORACLE:select d.DeviceID
,elog.eventdate as Event_log_date
,d.devicename As Current_Name
,substr(elog.description,2,instr(elog.description,'}')-2) as Prior_Name
,elog.description as Event_log_entry
from EvLog_ObjType_710 elog
join Devices d on d.DeviceID=elog.DeviceID
and d.TopologyType in ('_DB_DEVTYPE_CLIENT_','_DB_DEVTYPE_MASTER_','_DB_DEVTYPE_RELAY_')
and elog.deviceid in
from EvLog_ObjType_710 elog2
join Devices d2 on d2.DeviceID=elog2.DeviceID
and d2.DeviceName <> substr(elog2.description,2,instr(elog2.description,'}')-2)
group by d2.deviceid
order by d.deviceid, eventdate desc;
select d.DeviceID, COUNT(eventlogid) as "#_Name_Changes", d.devicename As Current_Name, substring(description from 2 for position('}' in description)-2) as Prior_Name, d.netbiosname as Current_NetbiosName from EvLog_ObjType_710 elog join Devices d on d.DeviceID=elog.DeviceID where EventType='_DB_EVENTTYPE_DEVICENAME_CHANGE_ENUM_' and lower(DeviceName) <> lower(substring(description from 2 for position('}' in description)-2)) group by d.deviceid ,d.devicename, d.netbiosname, Prior_Name having count(eventlogid) > 2 order by d.deviceid,"#_Name_Changes" desc
DeviceID Current_Name Prior_Name GloballyUniqueID min_eventdate max_eventdate NumberOfChanges
- Create a list of the Globally unique ids you will find in the results of this query. Separate every GUID by a ","
- Go to Global Settings > System Variables > Connection Management in the console and set this list into the field "List of Banned GUIDs"
Now you need to understand why you got it this situation:
- devices are not set with their final name before the BCM agent starts for the first time on the device?
- you deploy an image to install a device, and this device contains a BCM agent at already has an agent installed. This agent was started before the capture and it has a GUID in its identity.ini
- All your devices have the same name/hardware
If any of these two is confirmed then you'll need to change your process.