Upgrading to vCenter Server fails with the error: Source vCenter Server schema validation found an issue
search cancel

Upgrading to vCenter Server fails with the error: Source vCenter Server schema validation found an issue

book

Article ID: 313890

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
When you are upgrading to vCenter Server 6.x and using a database that was initially created by VMware Virtual Infrastructure 3 or earlier, you experience these symptoms:
  • The database had been upgraded from multiple versions of vCenter Server
  • In the %TEMP%\...\vcsUpgrade\vcdb_req.err file, you see entries similar to:

    '1 [42000](50000) [Microsoft][SQL Server Native Client 11.0][SQL Server]ERROR ! Missing constraints: VPX_EXT_SERVER_EMAIL.FK_VPX_EXT_EMAIL_REF_EXT_SERVER; VPX_EXT_TYPE_IDS.FK_VPX_EXT_TYPE_IDS_REF_EXT; Extra tables or columns: VPX_FEATURE.FEATURE_ID; VPX_FEATURE.FEATURE_NAME; VPX_FEATURE.FEATURE_ORDER; VPX_INVT_REP.COLLECT_DATE; VPX_INVT_REP.INVENTORY_ID; VPX_INVT_REP_VAL.FEATURE_ID; VPX_INVT_REP_VAL.INVENTORY_ID; VPX_INVT_REP_VAL.INVT_FEATURE_VAL; Extra constraints:VPX_EXT_SERVER_EMAIL.FK_VPX_EMAIL_REF_SERVER; VPX_EXT_TYPE_IDS.FK_VETI_REF_EXT; VPX_FEATURE.PK_VPX_FEATURE; VPX_INVT_REP.PK_VPX_INVT_REP; VPX_INVT_REP_VAL.FK_VPX_INVT_REP_VAL_REF_FEATID; VPX_INVT_REP_VAL.FK_VPX_INVT_REP_VAL_REF_INVTID;'


Cause

This issue occurs when tables or constraints that are no longer used exist within the vCenter Server database. The vCenter Server 6.0 database upgrade scripts do not remove these tables and prevent the upgrade from completing.

Resolution

This issue is resolved in VMware vCenter Server 6.5.x, available at Broadcom Support site
 
To work around this issue in previous versions, remove the old tables and rename the constraints within the vCenter Server database before the upgrade.

Note: This procedure modifies the database. Ensure to take a backup of the database before proceeding.

 
To remove the old tables and rename the constraints within the vCenter Server database:
  1. Take a backup of the existing vCenter Server database.
  2. Connect to the database instance for the vCenter Server database using Microsoft SQL Management Studio.
  3. Run these query's on the vCenter Server database:
     
    drop table VPX_INVT_REP_VAL
    drop table VPX_FEATURE
    drop table VPX_INVT_REP
    alter table VPX_EXT_SERVER_EMAIL drop constraint FK_VPX_EMAIL_REF_SERVER
    alter table VPX_EXT_SERVER_EMAIL add constraint FK_VPX_EXT_EMAIL_REF_EXT_SERVER foreign key (EXT_SERVER_ID) references VPX_EXT_SERVER (EXT_SERVER_ID)
    alter table VPX_EXT_TYPE_IDS drop constraint FK_VETI_REF_EXT
    alter table VPX_EXT_TYPE_IDS add constraint FK_VPX_EXT_TYPE_IDS_REF_EXT foreign key (EXT_ID) references VPX_EXT (EXT_ID)
     
  4. Run the vCenter Server 6.x upgrade process.