Search the VMware Knowledge Base (KB)
View by Article ID

Schema Validation errors when upgrading vCenter Server with PostgreSQL (2147952)

  • 3 Ratings
Language Editions


  • Upgrading vCenter Server with a PostgreSQL database fails with the error:

    Source vCenter Server schema validation found an issue. Resolution: Read the vcdb_req.err log file and address the issues found" 

  • In the VMware-VCS-logs-timestamp_number/vcsUpgrade/vcdb_req.err log file is empty. 

  • In the VMware-VCS-logs-timestamp_number/vcsUpgrade/UpgradeRunner.log file, you see entries similar to:

    ERROR vcdb.const Error while validating source vCenter Server database: Error while executing .\Upgrade-v2015-to-v2016\postgresql\validate_PostgreSQL.sql:298, reason: Cannot execute statement(rc=-1)

  • In PostgreSQL logs, you see entries similar to:



Running the 2147952_fix_dbm_missing_constraints.sql script attached to this article resolves the issue.


This issue occurs due to the missing primary key constraint PK_VPX_DBM_COUNTER_METADATA on table VPX_DBM_COUNTER_METADATA.


Caution: Back up the database prior to performing the steps in this article. For more information, see Back up and restore vCenter Server Appliance/vCenter Server 6.0 vPostgres database (2091961).

To resolve this issue, run the the 2147952_fix_dbm_missing_constraints.sql script:
  1. Download the 2147952_fix_dbm_missing_constraints.sql file attached to this article.
  2. Obtain the VCDB useranme and password from For more information, see Connecting to the embedded vPostgres Database in a Windows installed vCenter Server 6.0 (2108848).
  3. Open a command prompt and navigate to C:\program files\vmware\vcenterserver\vpostgres\bin.
  4. Run this command:

    psql.exe -U vc -d VCDB -f PATH_TO_SCRIPT

    For example:

    psql.exe -U vc -d VCDB -f C:\temp\2147952_fix_dbm_missing_constraints.sql

    Note: You'll be prompted for the VCDB username and password from step #2.

See Also


Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.


  • 3 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)

Please enter the Captcha code before clicking Submit.
  • 3 Ratings