i tried last time to upgrade one of our vcenter server running on a windows guest VM from version 6.0 Update 2 to the new VCSA 6.5 patchLevel “e”.
the upgrade assistant fails with a strange vcdb Error “Source vCenter Server schema validation found an issue”
in the migration logs i see the following Error:
Missing indexes: VPX_FIELD_DEF.PK_VPX_FIELD_DEF; VPX_FIELD_VAL.PK_VPX_FIELD_VAL;
Missing constraints: VPX_FIELD_DEF.PK_VPX_FIELD_DEF; VPX_FIELD_VAL.FK_VPX_F_VAL_REF_F_DEF; VPX_FIELD_VAL.PK_VPX_FIELD_VAL;
after investigating and check of the actual vCenter database (external DB on SQL Cluster) we found the issue that reports missing indexes and constraints in the DB.
with the following sql command we was able to make a DB correction and add the missing indexes
- make sure that vCenter services are stopped
- start SQL Management Studio and connect to the DB
- run this command :
delete from VPX_FIELD_VAL where FIELD_ID not in (select ID from VPX_FIELD_DEF);
- create missing constraint:
ALTER table VPX_FIELD_DEF ADD constraint PK_VPX_FIELD_DEF primary key (ID);
ALTER table VPX_FIELD_VAL ADD constraint PK_VPX_FIELD_VAL primary key (FIELD_ID, MO_ID);
ALTER table VPX_FIELD_VAL ADD constraint FK_VPX_F_VAL_REF_F_DEF foreign key (FIELD_ID) references VPX_FIELD_DEF (ID) on delete cascade;
- Make sure that vCenter services are running and try to perform upgrade.
now you continue the vCenter upgrade as excepted.
that´it 😉 VurIT