HP QC Daily License Usage Data

Question ID: 104197

Hi All,

I need, how many licenses of hp qc are consumed every day, out of total number of available licenses.

This data is shown in site admin front end.

I need to know, how can i get this data from database directly by writing SQL Query. I need to create report for the same.

Can any one please help me as it is very urgent.

Also refer the link:


Marked as spam
Posted by (Questions: 1, Answers: 0)
Asked on August 17, 2010 10:22 am
Answers (2)
Private answer

The information you're looking for is held in the Site Admin database's SESSIONS_HISTORY table. You can run your SQL queries against this table which contains these fields:

- **Session ID** (int): Unique ID (Primary key).
- **Start_Time** (DateTime): Date and time that the user logged in.
- **End_Time** (DateTime): Date and time that the user logged out. If null it means the session is active.
- **Domain_Name** (Varchar 255): Domain of the project which the user logged in to.
- **Project_Name** (Varchar 255): Project that the user logged in to.
- **User_Name** (Varchar 60): User name.
- **Client_Type** (Varchar 50): Client type (either a normal user or a QTP test execution client).

So, for example, if you wanted to report on how many users logged in for a specific date:

SELECT user_name,count(*)
group by user_name
order by count(*) desc

Marked as spam
Posted by (Questions: 0, Answers: 707)
Answered on February 14, 2013 7:00 pm
Private answer

I disagree with RickJames. I don't agree that the SESSIONS_HISTORY table can give you license usage information. A Session is not equivalent to a used license. A single user can have multiple sessions and consume only one license.

I've been looking at the site admin database tables, and while there are tables with names that seem to indicate they would hold license usage information (SESSION_LICENSE_HISTORY, STATISTIC_LICENSE_USAGE) in my system those tables don't contain any data.

I haven't yet figured out a way to get the license usage data.

Marked as spam
Posted by (Questions: 1, Answers: 101)
Answered on February 14, 2013 8:03 pm
You just need to do a count on unique users. That way, you're not counting sessions, but rather how many users logged on for a given time. Then, parse by client_type, if needed.
( at February 18, 2013 4:20 pm)
If the environment supports different types of licenses (full, Business Components, Defects, etc.) that would also have to be considered. One session may be a Full license while another may be a Defect license.
( at February 18, 2013 5:43 pm)