Best practices while deciding VCDB size

484 views Asked by At

How to optimize the ever growing VCDB. Can we keep a tab on the database size? What are the measures to take to clean up the database and reduce the size?

1

There are 1 answers

0
Steven Marks On

The main thing that fills up the database are the vCenter logs, as a start we tend to set the following:

To purge the data in the VPX_EVENT table: 1. Connect to Servername\SQL Database and log in with the appropriate credentials. 2. Click databases to expand and select VIM_VCDB > Tables. 3. Right-click the dbo.VPX_PARAMETER table and select Open.

Note: If you are using SQL Server 2008, right-click the dbo.VPX_PARAMETER table and click Edit Top 200 Rows.

  1. Modify event.maxAge to 30, and modify the event.maxAgeEnabled value to true.
  2. Modify task.maxAge to 30, and modify the task.maxAgeEnabled value to true.

    Note:To improve the time of the data cleanup, run the preceding steps in several intervals. To do this, ensure to keep the default value of event.maxAgeand task.maxAgeand perform step 6 to run the cleanup. Then, reduce the event.maxAgeand task.maxAgevalue by 60 and run the cleanup. Repeat the steps until the value is reached to 30 for the final cleanup process.

  3. Run the built-in stored procedure:

    a. Go to VIM_VCDB > Programmability > Stored Procedures. b. 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.

    c. When this has successfully completed, close SQL Management Studio and start the VMware Virtual Center Server service.

That should keep the db size down to a reasonable size. You can also setup maintenance plans to make the DB run better if required.