Scripts for tracking Licensing Compliance

RayanKS
Tera Contributor

Hi everyone,

 

We want to make custom reports without using Subscription Management app so we are trying to make custom queries/scripts to follow our licensing compliance.
Globally, we know that we can use license_subscribed_users and license_details tables to count our per-user metric for each product. For Unrestricted User metric, we already know that we just need active users in sys_user table.

 

We also need to track:

 

- roles assigned directly to users

- unmapped applications

- unmapped custom tables 

- deduplicate subscription role assigned several times to users

 

Does anyone have scripts to perform licensing analysis for these subjects or any best practices ?

 

Thanks for your help,

Rayan

3 REPLIES 3

Bert_c1
Kilo Patron

For seeing roles assigned to user, query the sys_user_has_role table. An encoded query that seems useful is:

 

"inherited=false^ORinh_count=0^state=active"

 

which can be specified in a report definition.

 

I don't know what you mean by 'unmapped', but you can query the sys_app table, that has related fields: 'Licensable" and "License Definition" and some other fields related to 'Subscription Management'.

 

for the last, report on sys_user_has_role, maybe a Pivot table using 'user' and 'role'.  Others here may have suggestions on this.

RayanKS
Tera Contributor

Thanks for your answer, by "unmapped" I meant custom tables not linked to a subscription and custom app not linked to a subscription.

 

Do you have best practice for following custom tables for each subscription ?

You will need to create a Support Case for questions on licensing, I don't know that area. And I believe there may be related changes coming where additional tables may result in some monetary cost.  I have never hesitated to create custom tables in Global or an Application scope. It is my understanding that those are 'free'.  But there is 'instance database size' considerations, that affect your company's hosting cost.  You will need to find some Sales Account manager/engineer to answer you questions.