VMware App Volumes event database cleaning

/ April 11, 2017/ VMware App Volumes

Before upgrading the VMware App Volumes Manager to the newest version 2.12, it’s recommended to clean the event database first.
With older version of App volumes like 2.10,2.11 the manager checks and records the device status like;

– Power on
– Shut down
– startup
– Reset
– Removed id

Without cleaning, the database can quickly grow to a size more than 100 GB

# Before cleaning ensure that you have a recent backup

Check the data

[code language=”SQL”]

SELECT * FROM log_records WHERE created_at < DATEADD(day, -60, GETDATE());
SELECT * FROM snapvol_timeseries WHERE created_at < DATEADD(day, -60, GETDATE());
SELECT * FROM system_messages WHERE created_at < DATEADD(day, -60, GETDATE());

[/code]
Delete the data

[code language=”SQL”]

DELETE FROM log_records WHERE created_at < DATEADD(day, -60, GETDATE());
DELETE FROM snapvol_timeseries WHERE created_at < DATEADD(day, -60, GETDATE());
DELETE FROM system_messages WHERE created_at < DATEADD(day, -60, GETDATE());

[/code]
Additional you can change the days to 30

[code language=”SQL”]

DELETE FROM log_records WHERE created_at < DATEADD(day, -30, GETDATE());
DELETE FROM snapvol_timeseries WHERE created_at < DATEADD(day, -30, GETDATE());
DELETE FROM system_messages WHERE created_at < DATEADD(day, -30, GETDATE());

[/code]

After that, shrink the database and do a check on one of the managers

# Recovery model must be set to simple #

Leave a Comment

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
*
*