VMware {code} Community
UKJohn
Contributor
Contributor

How do I obtain the data stored in vCenter SQL DB View [VPXV_LIC_USAGE_HISTORY] using the SDK / API?

Hi,

In the vCenter SQL DB, the [VPXV_LIC_USAGE_HISTORY] SQL view is a join between the [VPX_LIC_LICENSES] table and the [VPX_LIC_USAGE] table (there are some other tables but these are the main ones).

With the SDK, I can get the LicenseManager.LicenseAssignmentManager, and use QueryAssignedLicenses() to obtain license data (... and this data corresponds closely to the [VPX_LIC_LICENSES] SQL table). However, I can't find a way to obtain the data that corresponds to the [VPX_LIC_USAGE] table.

I believe the License Usage History Service takes snapshots on a regular basis. It is this time-stamped data I am trying to access.

The [VPX_LIC_USAGE] table has the following columns:

[SAMPLE_ID]

[CONTEXT_ID]

[SAMPLE_TS]

[SAMPLE_TIMESTAMP]

[USAGE]

[LAST_SAMPLE_COUNT]

[SAMPLE_DIGEST]

My goal here is to obtain the "SAMPLE_TIMESTAMP" values.

Any advice would be much appreciated.

Thanks

0 Kudos
0 Replies