Knowledge Base

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

cleanup_events_tasks_proc stored procedure fails to run on vCenter 4.0 (1014893)

Symptoms

  • The cleanup_events_tasks_proc stored procedure fails to run
  • If you are running an Oracle database you may experience the error:

    ORA-12012: error on auto execute of job 30
    ORA-02292: integrity constraint (VPXADMIN.FK_PARENT_TASK_REF) violated - child record found
    ORA-06512: at "VPXADMIN.CLEANUP_EVENTS_TASKS_PROC", line 1
    ORA-06512: at line 1"


  • If you are running Microsoft SQL, you may experience the error:

    The DELETE statement conflicted with the SAME TABLE REFERENCE constraint "FK_PARENT_TASK_REF". The conflict occurred in database "VCenter_DB", table "dbo.VPX_TASK", column 'PARENT_TASK_ID'. [SQLSTATE 23000] (Error 547) The statement has been terminated. [SQLSTATE 01000] (Error 3621). The step failed.

Resolution

This issue is caused by a database constraint conflict. This is a known issue which prevents the Tasks and Events cleanup job from properly running under certain circumstances. Updated stored procedures are now available which resolve the problem.
 
To resolve this issue for Microsoft SQL:
  1. Download cleanup_events_mssql.zip (attached to this article).
  2. Copy the zip file to the server which hosts the vCenter database and extract it.
  3. Open up SQL Enterprise Manager and enter the appropriate credentials to gain access to SQL.
  4. In the Object Explorer window navigate to the vCenter database > Programmability > Stored Procedures object.
  5. Right-click cleanup_events_tasks_proc.
  6. Click Delete to remove the existing stored procedure.
  7. Click File > Open > File.
  8. Select the cleanup_events_mssql.sql file.
  9. Click OK.

    Note: If prompted, enter the appropriate username and password.
     
  10. Ensure that the selected database in the Available Database dropdown menu is the vCenter database and not Master.
  11. Click Execute. If the job is created successfully, a message saying Command(s) Completed successfully displays.
  12. Click the Refresh button on the Object Explorer. The cleanup_events_tasks_proc stored procedure is recreated.
To resolve this issue for Oracle: 
  1. Download cleanup_events_oracle.zip (attached to this article).
  2. Extract the zip file.
  3. Open SQL Plus.
  4. Click File > Open > File.
  5. Select the cleanup_events_oracle.sql file.
  6. Click OK.
  7. Ensure that the vCenter Database is selected.
  8. Click Execute Query.  If the job is updated successfully a message confirming the procedure update is displayed.

Additional Information

Note: This issue can also be resolved with a fresh installation of VCenter 4.0 U2.

Tags

vcenter-db-stored-procedures

Attachments

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

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