How do I Purge ePO events in the DB, I have tried the below statements and they still do not work, please assist
SET rowcount 10000
DELETE FROM epoEvents
WHERE detectedutc < '2015-06-01'
WHILE @@rowcount > 0
BEGIN
DELETE FROM epoEvents
WHERE detectedutc < '2015-06-01'
END
SET rowcount 0
GO
Delete from OrionAuditLog where StartTime < (GetDate() - 90)
Solved! Go to Solution.
The tablenames changed from EPO 5 to 5.X and may have changed in EPO 10.
OLD: EPOProductEvents
NEW:EPOProductEventsMT
http://www.butsch.ch/post/Mcafee-EPO-Server-4X-Database-or-Space-growing-EPOevents.aspx
http://www.butsch.ch/post/MCAFEE-EPO-SQL-shrink-large-files-in-small-steps.aspx
Sample of tables from an EPO 5.3.1 Version:
use ePO_EMEA_butsch.ch
go
DELETE FROM epoEventsMT WHERE (DetectedUTC < GETDATE() - 14)
go
DELETE FROM EPOProductEventsMT WHERE (DetectedUTC < GETDATE() - 14)
go
DELETE FROM OrionAuditLogMT WHERE (StartTime < GETDATE() - 14)
go
DELETE FROM OrionSchedulerTaskLogMT WHERE (StartDate < GETDATE() - 14)
go
DELETE FROM OrionSchedulerTaskLogDetailMT WHERE (MessageDate < GETDATE() - 14
go
Use master
GO
, Welcome to McAfee community. Please see this kb McAfee Corporate KB - How to remove old events and shrink the ePolicy Orchestrator database KB68961
and possibly McAfee Corporate KB - ePolicy Orchestrator 5.x database size warning during upgrade KB79561
You can also do it from ePO console. You need to create a server task. You can then schedule it to run every month or as needed.
Anyone got the new SQL statement for EPO 5.10?
Looks like the same statement will work, but you just need to select the Event database and run it.
SET rowcount 10000
DELETE FROM epoEvents
WHERE threateventid = '1095'
WHILE @@rowcount > 0
BEGIN
DELETE FROM epoEvents
WHERE threateventid = '1095'
END
SET rowcount 0
GO
It is preferable to purge them using a server task in epo rather than directly from the database. However, if you do use one of the queries mentioned, please keep in mind that different versions of epo have different table names for the events, such as epoevents vs epoeventsmt.
What is the purpose of purging through sql vs the epo server tasks?
Was my reply helpful?
If this information was helpful in any way or answered your question, will you please select Accept as Solution in my reply and together we can help other members?
In some cases, purging using SQL is faster and more convenient. We had some events that were not set to purge and had 100+ milliion events.
That would make sense in that scenario
Was my reply helpful?
If this information was helpful in any way or answered your question, will you please select Accept as Solution in my reply and together we can help other members?
Do we also need to purge EPOProductEvents? Our pre-upgrade script also called out that database. I am guessing the same sql as above but from EPOProductEvents
Yes, you would. Validate also column names, as they may be different.
Was my reply helpful?
If this information was helpful in any way or answered your question, will you please select Accept as Solution in my reply and together we can help other members?
"You can also do it from ePO console. You need to create a server task. You can then schedule it to run every month or as needed."
Yes but for his case maybe:
ONLY if he has:
a) SPACE on Disks
b) ENOUGH Limit on the SQL
c) LIMIT if SQL Express according to Version not reached
The he has to go with OSQL.exe Commandline tool as example and shrink or cut events step by step in 100-500 at once.
Corporate Headquarters
6220 America Center Drive
San Jose, CA 95002 USA