VMware Cloud Community
Doug_Moloney
Contributor
Contributor

vpx_hist_stat2_<n> records not in VPX_SAMPLE_TIME2

The purge_stat2_proc stored procedure that purges the records from the  vpx_hist_stat2_<n> tables isn't cleaning up the records because they don't exist in the VPX_SAMPLE_TIME2 table.

I am find that I have millions of records in the vpx_hist_stat2_<n> tables that don't have a time_id in the VPX_SAMPLE_TIME2 table.  This has caused a very large database, is it ok to delete the records in each of the  vpx_hist_stat2_<n> tables that don't have a corresponding time_id in the VPX_SAMPLE_TIME table?

Anyone else have this issue?

0 Kudos
1 Reply
peetz
Leadership
Leadership

Hi Doug and welcome to the forums!

You really should avoid messing with the vCenter database directly. Running SQL statements against it should only be done when advised by VMware support or at least by a KB article.

In the VMware KB you will find a lot of articles about cleaning up the vCenter database. This one might be a good start:

http://kb.vmware.com/kb/1007453

Andreas

Twitter: @VFrontDe, @ESXiPatches | https://esxi-patches.v-front.de | https://vibsdepot.v-front.de
0 Kudos