The Audit DB is growing really fast, probably because I put too much into auditing. After archiving the database, I needed a way to clear the audit database.
I found the statement in Business Objects Board. http://www.forumtopics.com/busobj/viewtopic.php?t=105734&highlight=audit

select count(Event_ID) from AUDIT_DETAIL where event_id IN
(select Event_ID from AUDIT_EVENT where Start_Timestamp
between '01/01/2008' and '9/01/2008')

delete from AUDIT_DETAIL
where event_id in (select Event_ID from AUDIT_EVENT
where Start_Timestamp between '01/01/2008' and '9/01/2008')
go
delete from AUDIT_EVENT
where Start_Timestamp between '01/01/2008' and '9/01/2008'
go

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • DZone
  • Facebook
  • Google Bookmarks
  • Live
  • Technorati
  • TwitThis