BOB: Business Objects Board
Not endorsed by or affiliated with SAP

Register | Login 

 
Zoom Software, XI Tools (Opens a new window)  

Thu Aug 26, 2010 10:08 pm: Please read an important announcement regarding the ASUG Influencer Summit at the fall conference in Orlando. You will not want to miss the opportunity to address ASUG management directly.
General Notice: There is 1 job opening posted on www.BOBsJobs.net, "EBI Systems Architect-Ohio"
General Notice: There are 56 ASUG sponsored events in the next 45 days, see calendar for details.

Cleaning Audit DB
1 members found this topic helpful

 
Search this topic... | Search Auditor... | Search Box
Register or Login to Post    Forum Index -> Other Products -> Auditor  Previous TopicPrint TopicNext Topic
Author Message
The Boss
Principal Member
Principal Member



Joined: 08 Feb 2008

Posts: 110
Location: Chennai


flag
PostPosted: Wed Apr 02, 2008 5:57 am 
Post subject: Cleaning Audit DB

Hi, We have a requirement. We are running BOE XI R2.

We want to keep only the last 3 months data in the Audit database. We want to regularly cleanup the data which are more than 3 months old.

Could anybody shed some light on how to acheive this? Your help is much appreciated.

Thanks.
Back to top
haider
Forum Groupie
Forum Groupie



Joined: 18 Jul 2005
ASUG Icon
medal_gold.gif
Posts: 8783
Location: Kuwait


flag
PostPosted: Wed Apr 02, 2008 6:05 am 
Post subject: Re: Cleaning Audit DB

Your DBA should be able to help you in this by looking at the tables structure for XIr2 auditing.
There might be a date column in one of the tables on which the data purge can be done.

.

_________________
BO 6.x/ BO XIr2/XI 3.1, Oracle 9i/10g//11g, SQL Server, DB2, IIS .Net/Java (Tomcat)
Back to top
jsanzone
Forum Associate
Forum Associate



Joined: 12 Sep 2006

Posts: 936
Location: No. Virginia


flag
PostPosted: Wed Apr 02, 2008 10:47 am 
Post subject: Re: Cleaning Audit DB

The best that I can determine, there is no official documentation from BusinessObjects regarding a method to "trim" the Auditor database. Being that you are on XI R2, then these notes apply in this case. Here is the scoop:

There are six tables used by Auditor:
1) APPLICATION_TYPE (initialized w/ 13 rows, does not "grow")
2) AUDIT_DETAIL (tracks activity at a granular level, grows)
3) AUDIT_EVENT (tracks activity at a granular level, grows)
4) DETAIL_TYPE (initialized w/ 28 rows, does not "grow")
5) EVENT_TYPE (initialized w/ 41 rows, does not "grow")
6) SERVER_PROCESS (initialized w/ 11 rows, does not "grow")

If you simply want to remove all audit data and start over, then truncate AUDIT_EVENT and AUDIT_DETAIL.

If you want to only remove rows based on a period, then consider that the two tables, AUDIT_DETAIL and AUDIT_EVENT, are transactional in nature, however, AUDIT_DETAIL is a child to the parent table AUDIT_EVENT, thus you will want to remove rows from AUDIT_DETAIL based on its link to AUDIT_EVENT before removing rows from AUDIT_EVENT first. Otherwise, rows in AUDIT_DETAIL will get "orphaned" and never be of any use to you, and worse, you will not readily know how to ever delete these rows again.

Here are the SQL statements:
Code:
delete from AUDIT_DETAIL
where event_id =(select Event_ID from AUDIT_EVENT
                 where Start_Timestamp between '1/1/2006' and '12/31/2006')
go
delete from AUDIT_EVENT
                 where Start_Timestamp between '1/1/2006' and '12/31/2006'
go


One word of caution is to down your BOE application before doing this maintenance work, otherwise there is a possibility that Auditor will be busy trying to bring new rows to your database while you're busy deleting rows and you might encounter an unwanted table lock, either on the work you're doing or the work that BOE is trying to perform.

Good luck!
Back to top
Nick Daniels
Forum Groupie
Forum Groupie



Joined: 15 Aug 2002

Posts: 9439
Location: Yorkshire, England


flag
PostPosted: Wed Apr 02, 2008 1:51 pm 
Post subject: Re: Cleaning Audit DB

Is the audit database really taking up that much space? How much is 3 months worth?
_________________
Available for contract work from September 2010
Back to top
MarkDavisCraig
Forum Member
Forum Member



Joined: 15 Feb 2006

Posts: 21



PostPosted: Wed Sep 24, 2008 12:48 pm 
Post subject: Re: Cleaning Audit DB

Our Auditing database is getting enormous after 18 months of data have been captured. Has anybody established a regular process to purge old data from their audit tables? We were thinking about creating partitions so that we could still query all the data but only extracted the most recent changes.
Back to top
bernard timbal
Forum Addict
Forum Addict



Joined: 26 May 2003

Posts: 3221
Location: Paris - FRANCE


flag
PostPosted: Tue Oct 14, 2008 1:53 am 
Post subject: Re: Cleaning Audit DB

Very usefull information jsanzone, exactly what we were looking for our audit purge strategy in XI30. Just a remark in the sql purge code. I think, it is a "in" instead of a "="

Code:
select * from AUDIT_DETAIL where event_id IN (select Event_ID from AUDIT_EVENT where Start_Timestamp between '01/01/2008' and '31/12/2008')

_________________
Bernard TIMBAL DUCLAUX de MARTIN
BusinessObjects Platform Certified Consultant
Image link
BOBTI - BusinessObjects articles & tutorials
Co-author of a first book about SAP BusinessObjects XI3x Administration
Back to top
jsanzone
Forum Associate
Forum Associate



Joined: 12 Sep 2006

Posts: 936
Location: No. Virginia


flag
PostPosted: Tue Oct 14, 2008 7:27 am 
Post subject: Re: Cleaning Audit DB

Bernard,
Quote:
I think, it is a "in" instead of a "="
icon_redface.gif
Yep, you're right, thank you for noting the needed correction.
Good to go.
John
Back to top
J029
Forum Member
Forum Member



Joined: 27 Sep 2005

Posts: 9



PostPosted: Tue Dec 02, 2008 8:15 am 
Post subject: Re: Cleaning Audit DB

I would like to delete some rows (for a time period) from the audit tables but for the BO 6.5 version. Could you please help me? I need the queries...

Thanks!!!
Back to top
bernard timbal
Forum Addict
Forum Addict



Joined: 26 May 2003

Posts: 3221
Location: Paris - FRANCE


flag
PostPosted: Wed Dec 03, 2008 12:38 pm 
Post subject: Re: Cleaning Audit DB

Code:

DELETE FROM OBJ_A_EVENT_DETL DT WHERE DT.A_EVDET_N_ID IN (SELECT LG.A_EVLOG_N_ID FROM OBJ_A_EVENT_LOG LG WHERE LG.A_EVLOG_D_STARTIME < ADD_MONTHS(SYSDATE, -15));
DELETE FROM OBJ_A_EVENT_LOG LG WHERE LG.A_EVLOG_D_STARTIME < ADD_MONTHS(SYSDATE, -15);
DELETE FROM OBJ_A_SITE_LOG WHERE OBJ_A_SITE_LOG.A_STLOG_D_LOGTIME < ADD_MONTHS(SYSDATE, -15);


Here the code we use in production to have a 15 rolling months period regarding the oracle sysdate

Regards

_________________
Bernard TIMBAL DUCLAUX de MARTIN
BusinessObjects Platform Certified Consultant
Image link
BOBTI - BusinessObjects articles & tutorials
Co-author of a first book about SAP BusinessObjects XI3x Administration
Back to top
Display posts from previous:   
Register or Login to Post    Forum Index -> Other Products -> Auditor  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT - 5 Hours
 
Jump to:  

Index | About | FAQ | RAG | Privacy | Search |  Register |  Login 

Not endorsed by or affiliated with SAP
Powered by phpBB © phpBB Group
Generated in 0.1734 seconds using 14 queries. (SQL 0.0062 Parse 0.1522 Other 0.0150)
Hosted by ForumTopics.com | Terms of Service
phpBB Customizations by the phpBBDoctor.com
Shameless plug for MomentsOfLight.com Moments of Light Logo