Knowledge Base

The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides
 
Search the VMware Knowledge Base (KB)   View by Article ID
 

vCenter Server database upgrade fails with FK_VPX_EVENT_ARG_REF_EVENT is not a constraint (1013246)

Symptoms

  • vCenter database upgrade fails
  • The %temp%\VCdatabaseupgrade.log shows:

    alter table vpx_event_arg drop constraint FK_VPX_EVENT_ARG_REF_EVENT
    Error: Failed to execute SQL procedure. Got exception: ERROR [42000] [Microsoft][SQL Native Client][SQL Server]'FK_VPX_EVENT_ARG_REF_EVENT' is not a constraint.
    ERROR [42000] [Microsoft][SQL Native Client][SQL Server]Could not drop constraint. See previous errors.
    Error: Failed to execute command: alter table vpx_event_arg drop constraint FK_VPX_EVENT_ARG_REF_EVENT
    Error while upgrading: ERROR [42000] [Microsoft][SQL Native Client][SQL Server]'FK_VPX_EVENT_ARG_REF_EVENT' is not a constraint.
    ERROR [42000] [Microsoft][SQL Native Client][SQL Server]Could not drop constraint. See previous errors.
    Info: Exiting Upgrade Wizard
     
  • Upgrading from vCenter 2.5 to 4.0 build 208111 completes with the LDAP error:
     
    warning 25205 error loading license key to ldap server
     
  • VirtualCenter Server Service fails to start with vpxd logs showing the error:
     
    A database error occurred: "ODBC error: (42S22) - [Microsoft][SQL Native Client][SQL Server]Invalid column name 'increment_by'." is returned when executing SQL statement "select increment_by, id from vpx_sequence where name = ?"

Resolution

The vCenter Server database upgrade fails because the installer is attempting to delete a constraint that does not exist. You must restore to the pre-upgrade state and create the constraint.
  1. Restore from backup of vCenter database to the state taken before the upgrade.
  2. Uninstall vCenter 4.0 from the vCenter Server.
  3. Execute the following SQL statement on the database:

    ALTER TABLE [dbo].[VPX_EVENT_ARG]  WITH CHECK ADD  CONSTRAINT [FK_VPX_EVENT_ARG_REF_EVENT] FOREIGN KEY([EVENT_ID]) REFERENCES [dbo].[VPX_EVENT] ([EVENT_ID]) ON DELETE CASCADE

    Note: If your schema is different, you may need to change the command above. For example, [vmwareSQL].[VPX_EVENT_ARG] instead of [dbo].[VPX_EVENT_ARG] where vmwareSQL is the username in the customized schema.
  4. Attempt the upgrade to vCenter 4.0 again.
For detailed information about executing SQL scripts, consult your SQL documentation.

Update History

03/30/2010 - Added some additional feedback.

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.

Feedback

  • 6 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)
  • 6 Ratings
Actions
KB: