cancel
Showing results for 
Search instead for 
Did you mean: 

clean/purge old listener log files with oracle 11G

former_member196171
Participant
0 Kudos

Hi Experts,

We are using oracle 11G (11.2.0.3.0) on AIX

Listener log file ( log.xml) grows and after 10 MB it renames the file log_1.xml , log_2.xml ......so on, Finally the  directory gets full.

We have to delete the old files manually, brconnect cleanup job does not take care of listener logs cleanup

Our listener log location is /oracle/diag/tnslsnr/sapt1pdb/listener/alert/log.xml

Oracle DB Alert log location is /oracle/T1P/saptrace/diag/rdbms/t1p/T1P/alert/log.xml

How can we include listener log file  cleanup with brconnect ? is there any other automated way to clean purge old log files

Please help if any one has experties on this

Accepted Solutions (1)

Accepted Solutions (1)

ACE-SAP
Active Contributor
0 Kudos

Hello


It seems that you could use ADRCI for cleaning these logs as stated in the here under note.

There may be a way through BR*Tools also using option  cleanup_ora_dir as described in note 1647272

Regards


1431751 - Quick Reference for ADRCI and ADR

ADR base for the database listener (see MOS note 454927.1):

Set ADR base by adding the following entry in the listener.ora: ADR_BASE_<LISTENER_NAME>=/oracle/<DB_SID>/saptrace (Unix)

Appendix B: ADR purging policy (ADR Retention)

ADR Retention can be controlled with ADRCI:
There is retention policy for ADR that allow to specify how long to keep the data ADR incidents are controlled by two different policies:

  • The incident metadata retention policy    ( default is 1 year: LONGP_POLICY = 8760 hours)
  • The incident files and dumps retention policy      ( default is one month: SHORTP_POLICY = 720 hours)

MMON process automatically purges expired ADR data. You can change retention policy using "adrci".

adrci> SHOW CONTROL

To change the retention police issue the following commands:

adrci> SET CONTROL (SHORTP_POLICY = 360 )

adrci> SET CONTROL (LONGP_POLICY = 4380 )

For SAP the recommendation is to use the Oracle Default settings.

Answers (2)

Answers (2)

former_member182657
Active Contributor
0 Kudos

Hi Abu,

You can go for logrotate configuration at OS level & schedule shell script cron job for the execution of logrotate command daily weekly or hourly as per your needs.

Regards,

Gaurav

Sriram2009
Active Contributor
0 Kudos

This message was moderated.