Knowledge Base
The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides

|
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:
- Download cleanup_events_mssql.zip (attached to this article).
- Copy the zip file to the server which hosts the vCenter database and extract it.
- Open up SQL Enterprise Manager and enter the appropriate credentials to gain access to SQL.
- In the Object Explorer window navigate to the vCenter database > Programmability > Stored Procedures object.
- Right-click cleanup_events_tasks_proc.
- Click Delete to remove the existing stored procedure.
- Click File > Open > File.
- Select the cleanup_events_mssql.sql file.
- Click OK.
Note: If prompted, enter the appropriate username and password.
- Ensure that the selected database in the Available Database dropdown menu is the vCenter database and not Master.
- Click Execute. If the job is created successfully, a message saying Command(s) Completed successfully displays.
- Click the Refresh button on the Object Explorer. The cleanup_events_tasks_proc stored procedure is recreated.
To resolve this issue for Oracle:
- Download cleanup_events_oracle.zip (attached to this article).
- Extract the zip file.
- Open SQL Plus.
- Click File > Open > File.
- Select the cleanup_events_oracle.sql file.
- Click OK.
- Ensure that the vCenter Database is selected.
- Click Execute Query. If the job is updated successfully a message confirming the procedure update is displayed.
Additional Information
Tags
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.
Actions
KB:
- Updated:
- Categories:
- Languages:
- Product Family:
- Product(s):
- Product Version(s):

