ESX Virtualization

VMware ESXi, vSphere, VMware Backup, Hyper-V... how-to, videos....

Nakivo Backup and Replication - #1 Backup solution for Virtual, physical, cloud, NAS and SaaS

Menu
  • Certification
      • VCP-DCV vSphere 8
          • vcp2024-125.
        • Close
    • Close
  • VMware
    • Configuration Maximums
    • vSphere
      • vSphere 8.0
      • vSphere 7.0
      • vSphere 6.7
      • vSphere 6.5
      • vSphere 6.0
      • Close
    • VMworld
      • VMware EXPLORE 2024
      • VMware EXPLORE 2023
      • VMware EXPLORE 2022
      • VMworld 2019
      • VMworld 2018
      • VMworld 2017
      • VMworld 2016
      • VMworld 2015
      • VMworld 2014
      • VMworld 2013
      • VMworld 2012
      • VMworld 2011
      • Close
    • Close
  • Microsoft
    • Windows Server 2012
    • Windows Server 2016
    • Windows Server 2019
    • Close
  • Categories
    • Tips – VMware, Microsoft and General IT tips and definitions, What is this?, How this works?
    • Server Virtualization – VMware ESXi, ESXi Free Hypervizor, VMware vSphere Server Virtualization, VMware Cloud and Datacenter Virtualization
    • Backup – Virtualization Backup Solutions, VMware vSphere Backup and ESXi backup solutions.
    • Desktop Virtualization – Desktop Virtualization, VMware Workstation, VMware Fusion, VMware Horizon View, tips and tutorials
    • How To – ESXi Tutorials, IT and virtualization tutorials, VMware ESXi 4.x, ESXi 5.x and VMware vSphere. VMware Workstation and other IT tutorials.
    • Free – Free virtualization utilities, ESXi Free, Monitoring and free backup utilities for ESXi and Hyper-V. Free IT tools.
    • Videos – VMware Virtualization Videos, VMware ESXi Videos, ESXi 4.x, ESXi 5.x tips and videos.
    • Home Lab
    • Reviews – Virtualization Software and reviews, Disaster and backup recovery software reviews. Virtual infrastructure monitoring software review.
    • Close
  • Partners
    • NAKIVO
    • StarWind
    • Zerto
    • Xorux
    • Close
  • This Web
    • News
    • ESXi Lab
    • About
    • Advertise
    • Archives
    • Disclaimer
    • PDFs and Books
    • Close
  • Free
  • Privacy policy

Purge old data from vCenter

By Vladan SEGET | Last Updated: January 4, 2020

Shares

Shrink vCenter Database.

Update: For vCenter Server 5.1 and 5.5, see the To truncate all performance data from vCenter Server 5.1 and 5.5 section in Reducing the size of the vCenter Server database when the rollup scripts take a long time to run (1007453).
SQL Express 2005/2008 (vCenter Server 5.x is bundled with SQL Express 2008) supports a maximum of 5 hosts and 50 virtual machines. If your environment exceeds these thresholds, you must upgrade your database to SQL Standard edition.
The old data takes valuable place. And what if you don't have enough space? You battle to gain several megs here or threre on your volume, bu you know that there is a way to shrink the vCenter database too?

n vCenter Server 4.0.x there is a Database Retention Policy setting which allows you to specify when vCenter Server tasks and events should be deleted. And also there are a scripts attached to the KB article so you'll be able to use them on VirtualCenter 2.0.x, vCenter Server 2.5.x and vCenter Server 4.0.x.

You must use database admin account to run this script.

After the download from the vMware KB website, unzip on the desktop. Stop the vCenter Service and open the file. Then follow the video about how and where to enter the values concerning the from when you want to purge the data. First you can just do a simulation and then when changing value from delete data = 0 to delete data = 1 the data only will get purged.

So here is the video showing the scripts in action.

You can also use Ms SQL management studio to shrink your database:

01. In Object Explorer, connect to an instance of the SQL Server Database Engine, and then expand that instance.

02. Expand Databases, and then right-click the database that you want to shrink.

03. Point to Tasks, point to Shrink, and then click Database.

04. Enter the maximum percentage of free space to be left in the database files after the database has been shrunk. Permissible values are between 0 and 99.  Click OK to finish.

To download MS SQL server management studio express.

If the database has reached a 4 GB limit in SQL Express, the database is corrupted, or if vCenter Server is unavailable for any reason, purge the event and event_arg tables either by manually enabling the database retention policy in the database using SQL Studio, or by running the stored procedure to purge the data from these tables.

Source: VMwareKBTV

Shares
Vote !

| Filed Under: Videos Tagged With: how-to purge data from vCenter, shrink database, shrink vCenter Database VMware, vCenter Database, VMware purge data vCener

About Vladan SEGET

This website is maintained by Vladan SEGET. Vladan is as an Independent consultant, professional blogger, vExpert x16, Veeam Vanguard x9, VCAP-DCA/DCD, ESX Virtualization site has started as a simple bookmarking site, but quickly found a large following of readers and subscribers.

Connect on: Facebook. Feel free to network via Twitter @vladan.

Private Sponsors

Featured

  • Thinking about HCI? G2, an independent tech solutions peer review platform, has published its Winter 2023 Reports on Hyperconverged Infrastructure (HCI) Solutions.
  • Zerto: One Platform for Disaster Recovery, Backup & Cloud Mobility: Try FREE Hands-On Labs Today!
Click to Become a Sponsor

Most Recent

  • Commvault’s Innovations at RSA Conference 2025 San Francisco
  • VMware ESXi FREE is FREE again!
  • Installation of StarWind VSAN Plugin for vSphere
  • Protect Mixed environments with Nakivo Physical Machine recovery (bare metal)
  • No more FREE licenses of VMware vSphere for vExperts – What’s your options?
  • Tails – Your Private OS on USB Stick
  • StarWind V2V Converter Now has CLI
  • Veeam VHR ISO v2 – 2025 Download and Install
  • Deployment OVA and Installation of Nakivo Backup and Replication for VMware
  • XCP-NG FREE Hypervisor and XO Lite to deploy XOA

Get new posts by email:

 

 

 

 

Support us on Ko-Fi

 

 

Buy Me a Coffee at ko-fi.com

Sponsors

Free Trials

  • DC Scope for VMware vSphere – optimization, capacity planning, and cost management. Download FREE Trial Here.
  • Augmented Inline Deduplication, Altaro VM Backup v9 For #VMware and #Hyper-V – Grab your copy now download TRIAL.

VMware Engineer Jobs

VMware Engineer Jobs

YouTube

…

Find us on Facebook

ESX Virtualization

…

Copyright © 2025 ·Dynamik-Gen · Genesis Framework · Log in