Query for all unassociated devices

Version 1
    This document was generated from CDN thread

    Created by: david brawner on 27-10-2009 02:18:29 AM
    I need to be ale to retrieve a  list of all devices ( phones,Device profiles, IPC) that have no users associated to them.
     
    Prefereably by device pool.
     
     
    Does AXL allow for a search for non associated devices?
     
     

    Subject: RE: Query for all unassociated devices
    Replied by: David Staudt on 27-10-2009 03:49:50 AM
    Via <executeSQLQuery> you should be able to construct a SQL query against the UCM database tables that fulfills your requirements.  Please see the Data Dictionary on the Documentation tab for details on UCM tables/fields.
     
    Note, that this query could return large (huge) amounts of data, and is likely to trigger the AXL throttle which limits responses to 8MB in size (final AXL representation.)  You may need to find a way to reduce response size, with the last resort being 'skip/first' type SQL paging techniques.
     
    Note, the UCM database is intended to support a latency-sensitive real-time system.  Extreme care should be made to keep SQL accesses as fast and small as possible.  Data is highly normalized, and indexes may not be built as you might expect.  If possible, you should sync bulk table data (in small chunks) - like from the 'device' table - and do extensive querying/joining on an external database.