book
Article ID: 311212
calendar_today
Updated On:
Environment
VMware vCenter Server 5.0.x
VMware vCenter Server 5.1.x
VMware vCenter Server 5.5.x
VMware vCenter Server 4.1.x
VMware vCenter Server Appliance 5.1.x
Resolution
To resolve this issue:
Important:
- These steps should not be run on a vCenter Server 6.0 environment or a vCenter Server 5.5 environment connected to 6.0 Platform Service Controllers.
- Before performing any database operations, take complete backup of the database. VMware recommends that you consult a Database Administrator (DBA) before implementing any changes to the database configuration.
- Because the vCenter Server upgrade was not successful in the first attempt, there may be issues with other vCenter Server features (CIM-Hardware health status, SMS, query search).
- Performing this procedure results in loss of licensing history data.
- Verify that the user account being used to access the vCenter Server database has
db_owner
permissions.
For vCenter Server 5.x:
- Stop the VMware VirtualCenter Management Webservices service. For more information, see Stopping, starting, or restarting vCenter services (1003895).
- Ensure that the
VPX_LIC_*
tables are empty. If not, delete their contents.
To delete the contents from the VPX_LIC_*
tables:
- Launch SQL Management Studio (SQL Server) or SQL*Plus (Oracle).
- Run these SQL statements:
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_ASSET_PROPERTIES;
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;
Note: For vCenter Server 5.5.x run these additional statements:
DELETE FROM VPX_LIC_TPS_ASSETS;
DELETE FROM VPX_LIC_AUTO_KEYS;
DELETE FROM VPX_LICENSE;
- Run these
INSERT
statements to initialize the licensing metadata in the VPX_LIC_METADATA
table:
- For Microsoft SQL:
INSERT INTO VPX_LIC_METADATA (DATA_TYPE, LAST_SAMPLE_ID, LAST_SAMPLE_TIMESTAMP, RETAINED_SAMPLE_ID, RETAINED_SAMPLE_TIMESTAMP, GLOBAL_DIGEST, IS_STATE_VALID, WEEK_KEEP_COUNT)
VALUES('MAC', 0, CONVERT(datetime, '1900-12-31 00:00:00', 120), 0, CONVERT(datetime, '1900-12-31 00:00:00', 120), NULL, 1, -1);
INSERT INTO VPX_LIC_METADATA (DATA_TYPE, LAST_SAMPLE_ID, LAST_SAMPLE_TIMESTAMP, RETAINED_SAMPLE_ID, RETAINED_SAMPLE_TIMESTAMP, GLOBAL_DIGEST, IS_STATE_VALID, WEEK_KEEP_COUNT)
VALUES('UHD', 0, CONVERT(datetime, '1900-12-31 00:00:00', 120), 0, CONVERT(datetime, '1900-12-31 00:00:00', 120), NULL, 1, 208);
Note: For vCenter 5.5, run these additional statements:
INSERT INTO VPX_LIC_METADATA(DATA_TYPE, LAST_SAMPLE_ID, LAST_SAMPLE_TIMESTAMP, RETAINED_SAMPLE_ID, RETAINED_SAMPLE_TIMESTAMP, GLOBAL_DIGEST, IS_STATE_VALID, WEEK_KEEP_COUNT)
VALUES('ABT', 0, CONVERT(datetime, '1900-12-31 00:00:00', 120), 0, CONVERT(datetime, '1900-12-31 00:00:00', 120), NULL, 1, -1);
- For Oracle:
INSERT INTO VPX_LIC_METADATA(DATA_TYPE, LAST_SAMPLE_ID, LAST_SAMPLE_TIMESTAMP, RETAINED_SAMPLE_ID, RETAINED_SAMPLE_TIMESTAMP, GLOBAL_DIGEST, IS_STATE_VALID, WEEK_KEEP_COUNT)
VALUES('UHD',0, TO_DATE('1900-12-31 00:00:00','YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE('1900-12-31 00:00:00','YYYY-MM-DD HH24:MI:SS'), NULL, 1, 208);
INSERT INTO VPX_LIC_METADATA(DATA_TYPE, LAST_SAMPLE_ID, LAST_SAMPLE_TIMESTAMP, RETAINED_SAMPLE_ID, RETAINED_SAMPLE_TIMESTAMP, GLOBAL_DIGEST, IS_STATE_VALID, WEEK_KEEP_COUNT)
VALUES('MAC', 0, TO_DATE('1900-12-31 00:00:00','YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE('1900-12-31 00:00:00','YYYY-MM-DD HH24:MI:SS'), NULL, 1, -1);
You must run this statement when running vCenter Server 5.5:
INSERT INTO VPX_LIC_METADATA(DATA_TYPE, LAST_SAMPLE_ID, LAST_SAMPLE_TIMESTAMP, RETAINED_SAMPLE_ID, RETAINED_SAMPLE_TIMESTAMP, GLOBAL_DIGEST, IS_STATE_VALID, WEEK_KEEP_COUNT)
VALUES('ABT', 0, TO_DATE('1900-12-31 00:00:00','YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE('1900-12-31 00:00:00','YYYY-MM-DD HH24:MI:SS'), NULL, 1, -1)
- Start the VMware VirtualCenter Management Webservices service. For more information, see Stopping, starting, or restarting vCenter services (1003895).
For vCenter Server 4.1
- Stop the VMware VirtualCenter Management Webservices service. For more information, see Stopping, starting, or restarting vCenter services (1003895).
- Ensure that the
VPX_LIC_*
tables are empty. If not, delete their contents.
To delete the contents from the VPX_LIC_*
tables:
- Launch SQL Management Studio (SQL Server) or SQL*Plus (Oracle).
- Run these SQL statements:
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;
- Run this
INSERT
statement to initialize the licensing metadata in the VPX_LIC_METADATA
table:
- For SQL Server:
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);
- For Oracle:
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, TO_DATE('1900-12-31 00:00:00','YYYY-MM-DD HH24:MI:SS'), 0, TO_DATE('1900-12-31 00:00:00','YYYY-MM-DD HH24:MI:SS'), NULL, 1, 208);
- Start the VMware VirtualCenter Management Webservices service. For more information, see Stopping, starting, or restarting vCenter services (1003895).
Note: If these steps do not resolve the issue, you may have to recreate the stored procedures and/or rollup jobs. For more information, see
Verifying vCenter Server 4.1 jobs and stored procedures (1029824).