Showing results for 
Search instead for 
Did you mean: 

Deleting events from SQL Logs based on Host names+date


I would like to delete SQL Logs based on host names in my enterprise. I am using EPO 4.6 where one of the PC has introduced around a million events in the database on particular three days until it was re-imaged. does any one know a quick SQL query and the steps to execute that  that i can run on SQL server 2005 against my EPO database to delete events based on Node or object name( pc name ) and on certain date. Database is getting huge day by day. EPO is on Server 2003

Thanks a ton for your help.

1 Reply
Level 14
Report Inappropriate Content
Message 2 of 2

Re: Deleting events from SQL Logs based on Host names+date


I can only help you with specific dates only,

Purge events from the database.
All events older than the specified date will be removed from the database. For example, if reporting information for the last three months is required, then specify a date three months in the past.

  1. Type the command below at the 1> prompt and press ENTER:

    delete from EPOEvents where DetectedUTC < 'YYYY-MM-DD'

    Ensure that the format of the date is year-month-day. Example: 2007-12-01 for December 1, 2007.

  2. At the 2>  prompt, type go and press ENTER.
    NOTE: This command can take more than an hour to complete, depending on the number of events to purge. If this completes successfully, you see a message indicating the number of affected rows

May be some one else would jumpin and give you required command .

Thank you.