Licenses and the Users that Use Them

Any person who provides support for a Granite Inventory installation will inventibably need to know who is on the sytem and which licenses they are consuming. The License Utility application provides a simple interface to see your licnese consumption. Often that's all the information you need. However, there are times when you'll want to know who is using these licenses. The License Utility will offer a table similar to this:
Host Name Client ID Issued On Lease Expires Last Updated On
client01.telekom.com xng162361930 12-10-2013 02:59:28 12-10-2014 02:59:21 12-10-2013 02:59:28
client21.telekom.com xng162361932 12-10-2013 01:31:37 12-10-2014 01:31:37 12-10-2013 01:31:37
client44.telekom.com xng162361931 12-10-2013 02:17:54 12-10-2014 02:17:54 12-10-2013 02:17:54
client12.telekom.com xng162361935 12-10-2013 03:04:29 12-10-2014 03:04:29 12-10-2013 03:04:29
client98.telekom.com xng162367087 12-10-2013 03:47:19 12-10-2014 03:47:19 12-10-2013 03:47:19

OK. That's a start. But who is client98.corp.telekom.com? Client host names are often based on some internal IT naming convention and rarely (in my experience) provide clues the user's identity. Furthermore, that user's account name may not be the same as the account name used in Granite.

Luckly, Granite is keeping track of users and their license consumption. You just have to look a bit under the covers.

Open up your favorite SQL query tool and connect to the regional database of interest. Or, use Granite's Diagnostic's Query Builder if your privilege profile permits it. Either way, run the following query. Note that you may need to change 'xperadmin' to your particular admin database name if you aren't using the default name.

SELECT
        u.user_name,
        t.token,
        l.description
    FROM
        xperadmin.active_users u,
        xperadmin.active_user_tokens t,
        xperadmin.xng_license_definitions l
    WHERE
        u.client_id = t.client_id
        AND
        t.token = l.license_type;
The query results will give you the Granite user name, license key, and license name.
USER_NAME TOKEN DESCRIPTION
harrison@client01.telekom.com XCO-01-001 Granite Inventory
hannah@client21.telekom.com ASI-01-000 ASI API Toolkit
quinn@client44.telekom.com XCO-01-001 Web-OPI Portal
dexter@client12.telekom.com XCO-01-001 Granite Inventory
deborah@client98.telekom.com XCO-01-001 Granite Inventory
I find this information proves to be much more useful than the default License Utility results when troubleshooting license exhaustion or performance issues. I hope you find it useful as well!