Hello everybody,
after upgrading (migrate to 64bit OS) the vCenter Server in our test environment to 4.1 we are checking the vCenter Service Status.
There was an error on the "Lincensing Accounting Module health monitor" service that means that no license information are stored in the database.
This error could be solved by adding the database procedure (process_license_snapshot_proc) which was not present after the upgrade.
After that we run the procedure manually and after some moment we could see the current licenses but downloading the report faild with the following error.
"Cannot export license usage. License data integrity problem detected in the database of %vcenter%"
In the Datacenter Admin guide could be found the following informations.
Cause
The license usage data stored in the database has been modified. Modifying license records in vCenter Server
database is not recommended.
Solution
None. You can no longer download licensing reports for this vCenter Server or Linked Mode group with this
time period.
Is there really no solution to solve this error?
We don't modify any data in the database.
MfG
Randis
Here is a Solution:
!!!All licensing history data will be lost!!!
1. "VMware VirtualCenter Management Webservices" should be stopped 2. All VPX_LIC_* tables should be empty (if not, their content must be deleted). This can be done using "Microsoft SQL Server Management studio".
DELETE FROM VPX_LIC_SNAPSHOT;
DELETE FROM VPX_LIC_SNAPSHOT_VC_GROUP;
DELETE FROM VPX_LIC_USAGE;
DELETE FROM VPX_LIC_CONTEXT;
DELETE FROM VPX_LIC_ASSETS;
DELETE FROM VPX_LIC_LICENSES;
DELETE FROM VPX_LIC_VC_GROUP_MEMBERS;
DELETE FROM VPX_LIC_VC_GROUPS;
DELETE FROM VPX_LIC_METADATA;
DELETE FROM VPX_LIC_SETTINGS;
3. Initialize licensing metadata in VPX_LIC_METADATA table using following INSERT statement. This can be done using "Microsoft SQL Server Management studio".
INSERT INTO VPX_LIC_METADATA (LAST_SAMPLE_ID, LAST_SAMPLE_TIMESTAMP, RETAINED_SAMPLE_ID, RETAINED_SAMPLE_TIMESTAMP, GLOBAL_DIGEST, IS_STATE_VALID, WEEK_KEEP_COUNT)
VALUES(0, CONVERT(datetime, '1900-12-31 00:00:00', 120), 0, CONVERT(datetime, '1900-12-31 00:00:00', 120), NULL, 1, 208);
4. Start: "VMware VirtualCenter Management Webservices"
I hope you have waited more than 5 minutes for this statement. Because after the License Server restart it was working, for 10 Minutes, but it came later back to the root cause.
Senseipetz
Its green since some hours....
... is this a problem?
For what I need the licensing history data?
In my case the stored procedure process_license_snapshot_proc was missing.