09-03-2014 02:01 AM - edited 03-17-2019 12:00 AM
Hi Guys,
we're cleaning up our Callmanager environment right now and I wanna get rid of User Device Profiles which never have been deleted. Is there any way (my thought was via SQL) to at least show up the Device Profiles, who don't have a Line [1] number associated with it (the DNs already have been deleted but there still a lot of old Profiles laying around)
Thanks for a short reply
cheers
Marc
Solved! Go to Solution.
09-03-2014 03:13 PM
Maybe someone can do it easily with SQL but my thought is you could export the UDPs, filter for profiles that dont have Directory NUmber 1 in the header and use this list to delete the profiles.
09-04-2014 01:09 AM
Try this:
run sql select device.name from device where not exists (select fkdevice from devicenumplanmap where devicenumplanmap.fkdevice = device.pkid) and device.tkclass = 254
... though George's answer is equally practical for non-SQL types (+5) :-)
Aaron
09-03-2014 03:13 PM
Maybe someone can do it easily with SQL but my thought is you could export the UDPs, filter for profiles that dont have Directory NUmber 1 in the header and use this list to delete the profiles.
09-04-2014 12:59 AM
You're right, thats just what I've done. Bulk exported all of the Device Profiles in csv and sorted them in Excel. Think thats the easiest solution for this one.
09-04-2014 01:22 AM
My answer works too though :-)
12-23-2015 09:46 AM
Aaron, thanks for this SQL statement! Its help a lot. Do you (or anyone else) know of a way to see a time-stamp of the last time a user device profile was used? We are running into an issue where UDP's are associated to an end user, but that end user has changed job functions and no longer uses the UDP for Extension Mobility. So we have UDP's associated to an end user so it would theoretically be used, but they aren't. The query to find UDP's that are no longer associated to a user is below.
run sql select d.name from device d where (0=(select count(edm.pkid) from enduserdevicemap edm where edm.fkdevice=d.pkid)) and d.tkclass=254 order by d.name
09-04-2014 01:09 AM
Try this:
run sql select device.name from device where not exists (select fkdevice from devicenumplanmap where devicenumplanmap.fkdevice = device.pkid) and device.tkclass = 254
... though George's answer is equally practical for non-SQL types (+5) :-)
Aaron
09-04-2014 03:53 AM
And thats the proper SQL statement which I was looking for. :D
Thanks a lot
04-13-2019 05:45 AM
Can you please provide me the query to get the Device profile information with extension and description?
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: