11 Jun 2008 @ 2:27 PM 
 

Purge data from your Virtual Center Database

 

The last few weeks it wasn’t fun having a VMWare ESX environment. SQL transaction logs that were out of control, ESX server that lost there iSCSI connection, etc.

One of the thing I was investigating was the size of our virtual center database. What I found was that data (events, tasks, etc) is being stored in the database but never deleted.

When browsing the VMWare site I found this SQL script in the knowledgebase of VMWare. The script inspects the database for data older than a certain date. The script works for virtual center 2.0 and 2.5.

———————————————————–
– Use one of these methods to specify the data cutoff date
– SET @CUTOFF_DATE = GETUTCDATE()-180
SET @CUTOFF_DATE = ‘2008/01/01′ <– cut off date
———————————————————–

Default the script count the rows that can be deleted. If you set deletedata to 1 than the script will purge the data from the database.I removed 2.5 million rows from our Virtual Center database and we noticed an increase of performance.

Use it carefully!!! Make your backups.

Tags Categories: SQL server, VMWare Posted By: Richard
Last Edit: 11 Jun 2008 @ 02 29 PM

EmailPermalink
 

Responses to this post » (None)

 

Post a Comment

You must be logged in to post a comment.

\/ More Options ...
Change Theme...
  • Users » 62
  • Posts/Pages » 19
  • Comments » 1
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

About me



    No Child Pages.