This was a different type of incident and I experienced this issue while I’m upgrading the vCenter server 5.5 to 6.0 and “Source vCenter Server Schema validation found an issue” error appeared at the start of the upgrade. First of all I would like to tell you this this vCenter was an old vCenter server with Oracle database which was coming from earlier vCenter server editions and it was finally upgraded to vCenter server 5.5.
I had to upgrade this vCenter server to vCenter server 6.0 and this error message appeared in the very beginning of the vCenter upgrade.
Resolution: Please ensure extensions are compatible with the new vCenter server and re-register extensions with the new vCenter server after upgrade.
Please refer to the vSphere documentation on extensions, and the upgrade and interoperability guides. Error: Source vCenter Server schema validation found an issue.
Resolution: Read the vcdb_req.err log file and address the issue found.

Actually, we can think about the extensions issue later or we can ignore that as we can re-register them. Actual issue was not with the extensions and “Source vCenter Server Schema validation found an issue”, that’s was the main concern about this issue.
I opened the “vcdb_req.err” file which was under “C:\Users\Administrator\AppData\Local\Temp\vcsUpgrade” location

I was able to identify the below errors in the “vcdb_req.err” log as below
1 [HY000](20000) [Oracle][ODBC][Ora]ORA-20000: ERROR ! Missing constraints: VPX_DATASTORE.FK_VPX_DS_DC_REF_VPX_ENT,VPX_DEVICE.VPX_DEVICE_P1;
ORA-06512: at line 260
ERROR: Cannot execute statement(rc=-1).
DECLARE
l_text_full VARCHAR2(32767) := NULL;
l_text VARCHAR2(2000) := NULL;
l_verid int;
BEGIN

I was searching a solution for this “ERROR” I was able to find couple of VMware Knowledge base articles and some database level queries had to directly run on the database console.
I found the similar errors in VMware KB 2147549 and I wanted to check this in the database.
Those entries were like this

The given queries in the VMware KB article has some query errors and had to modify those queries in order to do the modification correctly on the DB.

These are the corrected queries to fix the issue
alter table VPX_DEVICE add constraint VPX_DEVICE_P1 primary key (DEVICE_ID) using index VPX_DEVICE_P1; alter table VPX_DATASTORE rename constraint FK_VPX_DS_REF_VPX_ENTITY to FK_VPX_DS_DC_REF_VPX_ENT alter table VPX_DATASTORE rename constraint FK_VPX_DS_REF_VPX_ENTI to FK_VPX_DS_REF_VPX_ENTITY
After that I was able to proceed with the upgrade successfully.
A Word Of Advise
That’s it, hope this article will help you to fix similar issues in your environment. Normally, this happens in very old vCenters which are upgraded to different versions.
References:
If you found this post as useful please rate the post and share it!
Leave a Reply