VPX_EVENT
table:- Connect to
Servername\SQL Database
and log in with the appropriate credentials. - Click databases to expand and select VIM_VCDB > Tables.Note: By default, the vCenter Server database is named
VIM_VCDB
, unless it was renamed during initial creation. - Right-click the dbo.VPX_PARAMETER table and click Open.Note: If you are using SQL Server 2008, right-click the dbo.VPX_PARAMETER table and click Edit Top 200 Rows.
- Modify event.maxAge to 30 and the event.maxAgeEnabled value to true.
- Modify task.maxAge to 30 and the task.maxAgeEnabled value to true.Note: To improve the time of the data cleanup, run the preceding steps in several intervals:
- Ensure to keep the default value of event.maxAge and task.maxAge.
- Perform step 6 to run the cleanup.
- Reduce the event.maxAge and task.maxAge value by 60 and run the cleanup.
- Repeat the steps a-c until the value is reached to 30 for the final cleanup process.
- Run the built-in stored procedure:
- Go to VIM_VCDB > Programmability > Stored Procedures.
- Right-click dbo.cleanup_events_tasks_proc and select Execute Stored Procedure.This purges the data from the vpx_event, vpx_event_arg, and vpx_task tables based on the date specified for maxAge.
- When purging is successfully completed, close the SQL Management Studio and start the VMware Virtual Center Server service.
- Ensure that the default Statistics Level is set to 1:
- Using the vSphere Client, log in to vCenter Server as an administrator.
- Go to Administration > vCenter Server Settings > Statistics.
- Under Statistics Intervals, ensure the Statistics Level column is set to 1.
- To change the value, select the Interval Duration, click Edit and select Level 1 from the list.
- The execution of
dbo.cleanup_events_tasks_proc
may take a long period of time depending on the database size. - The operation may fail due to the transaction logs being filled up at multiple intervals based on the data to be purged. You must shrink the Transaction logs when required and run
dbo.cleanup_events_tasks_proc
again.
Truncate the event and tasks table
To Truncate the event and tasks table, run this script:
alter table VPX_EVENT_ARG drop constraint FK_VPX_EVENT_ARG_REF_EVENT, FK_VPX_EVENT_ARG_REF_ENTITY
alter table VPX_ENTITY_LAST_EVENT drop constraint FK_VPX_LAST_EVENT_EVENT
truncate table VPX_TASK
truncate table VPX_ENTITY_LAST_EVENT
truncate table VPX_EVENT
truncate table VPX_EVENT_ARG
alter table VPX_EVENT_ARG add constraint FK_VPX_EVENT_ARG_REF_EVENT foreign key(EVENT_ID) references VPX_EVENT (EVENT_ID) on delete cascade,
constraint FK_VPX_EVENT_ARG_REF_ENTITY foreign key (OBJ_TYPE) references VPX_OBJECT_TYPE (ID)
alter table VPX_ENTITY_LAST_EVENT add constraint FK_VPX_LAST_EVENT_EVENT foreign key(LAST_EVENT_ID)
references VPX_EVENT (EVENT_ID) on delete cascade
More inforamtion :
http://bohemiangrove.co.uk/vmware-vcenter-server-5-5-database-is-full/