<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
It is up to you (or subsequent reader of this post) to verify on your
specific system and version.&nbsp; This is provided as-is without any
implied warranty. User beware.<br>
<br>
I've not done this since 4.x so I'll share a bit of thought process and
resources.&nbsp; First, there are *many* things in the database.&nbsp; It is best
to limit scope as much as possible to avoid potential side effects.&nbsp;
You are interested in user device profiles.&nbsp; Looks like those can be
identified by device.tkdeviceprofile=1:<br>
<br>
<tt>admin:run sql select * from typedeviceprofile<br>
enum moniker&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
==== ==================================== ======================= <br>
2&nbsp;&nbsp;&nbsp; DEVICE_PROFILE_AUTOGENERATED_PROFILE Autogenerated Profile&nbsp;&nbsp; <br>
1&nbsp;&nbsp;&nbsp; DEVICE_PROFILE_USER_PROFILE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; User Profile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
0&nbsp;&nbsp;&nbsp; DEVICE_PROFILE_REAL_DEVICE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Real Device&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
3&nbsp;&nbsp;&nbsp; DEVICE_PROFILE_MODEL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Model Profile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
4&nbsp;&nbsp;&nbsp; DEVICE_PROFILE_USER_TEMPLATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; User Template Profile&nbsp;&nbsp; <br>
5&nbsp;&nbsp;&nbsp; DEVICE_PROFILE_SYSTEM_TEMPLATE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System Template Profile <br>
<br>
admin:run sql select count(*) from device where tkdeviceprofile=1<br>
(count(*)) <br>
========== <br>
8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </tt><br>
<br>
>From this we need the user device profiles which are not associated
with users:<br>
<tt>admin:run sql select count(*) from device where tkdeviceprofile=1
and pkid not in (select fkdevice from enduserdevicemap)<br>
(count(*)) <br>
========== <br>
7&nbsp;&nbsp; <br>
</tt><br>
You can make a report and spot check your results with the output of
additional queries:<br>
<tt>admin:run sql select name,pkid from device where tkdeviceprofile=1
and pkid not in (select fkdevice from enduserdevicemap)<br>
admin:run sql select distinct(fkdevice) from enduserdevicemap<br>
</tt><br>
/Wes<br>
<br>
<br>
<br>
On Monday, July 12, 2010 1:35:58 PM,
<a class="moz-txt-link-rfc2396E" href="mailto:James.Brown@barclayswealth.com">&lt;James.Brown@barclayswealth.com&gt;</a> wrote:<br>
<blockquote
 cite="mid:B9DF56D02BDFC743970D814FA1780BB40414B1EF85@GBRPSMMSWM05VA.gbl.barwealth.net"
 type="cite">
  <blockquote type="cite">
    <pre wrap="">Could I ask for advice on the best way to delete CM6 UDPs which are no longer associated with an end-user please?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Sorry for the typos in my earlier post. The query I had in mind would be something like:

run sql 
SELECT a.name
FROM device a 
    LEFT OUTER JOIN enduserdevicemap b ON a.pkid = b.fkdevice
WHERE b.pkid IS NULL AND a.tkdeviceprofile = 1

Has anyone tried this before?

Barclays Wealth is the wealth management division of Barclays Bank PLC. This email may relate to or be sent from other members of the Barclays Group.

The availability of products and services may be limited by the applicable laws and regulations in certain jurisdictions. The Barclays Group does not normally accept or offer business instructions via internet email. Any action that you might take upon this message might be at your own risk.

This email and any attachments are confidential and intended solely for the addressee and may also be privileged or exempt from disclosure under applicable law. If you are not the addressee, or have received this email in error, please notify the sender immediately, delete it from your system and do not copy, disclose or otherwise act upon any part of this email or its attachments.

Internet communications are not guaranteed to be secure or without viruses. The Barclays Group does not accept responsibility for any loss arising from unauthorised access to, or interference with, any Internet communications by any third party, or from the transmission of any viruses. Replies to this email may be monitored by the Barclays Group for operational or business reasons.

Any opinion or other information in this email or its attachments that does not relate to the business of the Barclays Group is personal to the sender and is not given or endorsed by the Barclays Group.

Barclays Bank PLC. Registered in England and Wales (registered no. 1026167).
Registered Office: 1 Churchill Place, London, E14 5HP, United Kingdom.

Barclays Bank PLC is authorised and regulated by the Financial Services Authority.

_______________________________________________
cisco-voip mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cisco-voip@puck.nether.net">cisco-voip@puck.nether.net</a>
<a class="moz-txt-link-freetext" href="https://puck.nether.net/mailman/listinfo/cisco-voip">https://puck.nether.net/mailman/listinfo/cisco-voip</a>
  </pre>
</blockquote>
<br>
</body>
</html>