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 xng162361930 12-10-2013 02:59:28 12-10-2014 02:59:21 12-10-2013 02:59:28 xng162361932 12-10-2013 01:31:37 12-10-2014 01:31:37 12-10-2013 01:31:37 xng162361931 12-10-2013 02:17:54 12-10-2014 02:17:54 12-10-2013 02:17:54 xng162361935 12-10-2013 03:04:29 12-10-2014 03:04:29 12-10-2013 03:04:29 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 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.

        xperadmin.active_users u,
        xperadmin.active_user_tokens t,
        xperadmin.xng_license_definitions l
        u.client_id = t.client_id
        t.token = l.license_type;
The query results will give you the Granite user name, license key, and license name.
USER_NAME TOKEN DESCRIPTION XCO-01-001 Granite Inventory ASI-01-000 ASI API Toolkit XCO-01-001 Web-OPI Portal XCO-01-001 Granite Inventory 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!