Purge obsolete logs in oracle EBS r12

Introduction: –


In this post we will learn Purge obsolete logs in oracle EBS r12. Purging is regular activity to clear old logs from log location. We can improve performance our database and apps to clear obsolete logs which is not required.

Purge obsolete logs in oracle EBS r12
Purge obsolete logs in oracle EBS r12

Following command will help you in regular activity to Purge obsolete logs in oracle EBS r12 the log file.

1. Report cache/Apache logs: Retention period 5days

/usr/bin/find $LOG_HOME/ora/10.1.2/reports/cache/ -mtime +30 -exec rm {};
/usr/bin/find $LOG_HOME/ora/10.1.3/Apache -mtime +15 -exec rm {};

 

2. Apache logs: Retention period 7days

 

/usr/bin/find $LOG_HOME/ora/10.1.3/Apache/ -mtime +30 -exec rm {};

 

3. Concurrent manager log files : Retention period 30days

 

/usr/bin/find $LOG_HOME/appl/conc/log/ -mtime +30 -exec rm  {} ;

 

4. Concurrent manager out files : Retention period 30days

 

/usr/bin/find $LOG_HOME/appl/conc/out/ -mtime +30 -exec rm  {} ;

 

5. Appltmp logs: Retention period 30days

 

/usr/bin/find $APPLTMP/ -mtime +30 -exec rm  {} ;

 

6. Opmn logs: Retention period 7days


/usr/bin/find $LOG_HOME/ora/10.1.3/opmn/ -mtime +7 -exec rm {} ;

find /oracle/PROD/inst/apps/PROD_appsprod/logs/ora/10.1.2/reports/cache -mtime +30 -exec rm {};

 

To automate the purging activity via crontab use the below scripts: –

 

 

Script file: – purgingactivity.sh

 
#!/bin/bash
. /oracle/PROD/apps/apps_st/appl/APPSPROD_appsprod.env
 
#Report cache logs: Retention period 30 days
 
find $LOG_HOME/ora/10.1.2/reports/cache/ -mtime +30 -exec rm  {} ;
 
#Apache logs: Retention period 30 days
 
find $LOG_HOME/ora/10.1.3/Apache/ -mtime +30 -exec rm  {} ;
 
#Concurrent manager log files : Retention period 7days
 
find $LOG_HOME/appl/conc/log/ -mtime +7 -exec rm  {} ;
 
#Concurrent manager out files : Retention period 7days
 
find $LOG_HOME/appl/conc/out/ -mtime +7 -exec rm  {} ;
 
#Appltmp logs: Retention period 30days
 
find $APPLTMP/ -mtime +15 -exec rm  {} ;
 
#Opmn logs: Retention period 7days
 
find $LOG_HOME/ora/10.1.3/opmn/*log* -mtime +7 -exec rm  {} ;
 
 
For R12.2:- 

 

 

Remove Weblogic forms Server Logs

 
find /oracle/DB/EBSFS/fs1/FMW_Home/user_projects/domains/EBS_domain/servers/forms_server1/logs -mtime +30 -exec rm  {} ;
 
find /oracle/DB/EBSFS/fs2/FMW_Home/user_projects/domains/EBS_domain/servers/forms_server1/logs -mtime +30 -exec rm  {} ;
 
 
 
find /oracle/DB/EBSFS/fs1/FMW_Home/user_projects/domains/EBS_domain/servers/forms_server2/logs -mtime +30 -exec rm  {} ;
 
find /oracle/DB/EBSFS/fs2/FMW_Home/user_projects/domains/EBS_domain/servers/forms_server2/logs -mtime +30 -exec rm  {} ;
 
 
 

Remove Weblogic oacore Server Logs

 
find /oracle/DB/EBSFS/fs1/FMW_Home/user_projects/domains/EBS_domain/servers/oacore_server1/logs -mtime +30 -exec rm {} ;
 
find /oracle/DB/EBSFS/fs2/FMW_Home/user_projects/domains/EBS_domain/servers/oacore_server1/logs -mtime +30 -exec rm {} ;
 
 
find /oracle/DB/EBSFS/fs1/FMW_Home/user_projects/domains/EBS_domain/servers/oacore_server2/logs -mtime +30 -exec rm {} ;
 
find /oracle/DB/EBSFS/fs2/FMW_Home/user_projects/domains/EBS_domain/servers/oacore_server2/logs -mtime +30 -exec rm {} ;
 
 

Remove Weblogic oafm_server Server Logs

 
find /oracle/DB/EBSFS/fs1/FMW_Home/user_projects/domains/EBS_domain/servers/oafm_server1/logs -mtime +30 -exec rm {} ;
 
find /oracle/DB/EBSFS/fs2/FMW_Home/user_projects/domains/EBS_domain/servers/oafm_server1/logs -mtime +30 -exec rm {} ;
 
 
find /oracle/DB/EBSFS/fs1/FMW_Home/user_projects/domains/EBS_domain/servers/oafm_server2/logs -mtime +30 -exec rm {} ;
 
find /oracle/DB/EBSFS/fs2/FMW_Home/user_projects/domains/EBS_domain/servers/oafm_server2/logs -mtime +30 -exec rm {} ;
 
 

Remove Weblogic OHS Logs

 
 
find /oracle/DB/EBSFS/fs1/FMW_Home/webtier/instances/EBS_web_OHS1/diagnostics/logs/OHS/EBS_web -mtime +30 -exec rm {} ;
find /oracle/DB/EBSFS/fs2/FMW_Home/webtier/instances/EBS_web_OHS1/diagnostics/logs/OHS/EBS_web -mtime +30 -exec rm {} ;
 
 
 
find /oracle/DB/EBSFS/fs1/FMW_Home/webtier/instances/EBS_web_OHS2/diagnostics/logs/OHS/EBS_web -mtime +30 -exec rm {} ;
 
find /oracle/DB/EBSFS/fs2/FMW_Home/webtier/instances/EBS_web_OHS2/diagnostics/logs/OHS/EBS_web -mtime +30 -exec rm {} ;
 
 
 

Remove Weblogic wlst Server Logs

 
 
find /oracle/DB/EBSFS/fs1/FMW_Home/logs -mtime +30 -exec rm {} ;
 
find /oracle/DB/EBSFS/fs2/FMW_Home/logs -mtime +30 -exec rm {} ;
 
 
 

Remove old outputs $APPLCSF/out 

 
find /oracle/DB/EBSFS/fs_ne/inst/DB_appssrv/logs/appl/conc/out -mtime +30 -exec rm {} ;
 
 
 

Remove old Concurrent request $APPLCSF/log

 
 
find /oracle/DB/EBSFS/fs_ne/inst/DB_appssrv/logs/appl/conc/log -mtime +30 -exec rm {} ;
 
Once purgingactivity.sh will schedule through crontab job, automatically it will purge the all log.
 
The program “PURGE SIGNON AUDIT DATA” should be scheduled to run within the next 30 days with the following parameter value:
 
Audit date: <30 days prior to the scheduled run date>

 

In addition, the “Increment date parameters each run” scheduling option should be selected for the scheduled run of the program.
 
You can also run the below concurrent request from Sysadmin responsibility:
 
Purge Concurrent Request and/or Manager Data Program
 
 
 
 

Useful/Related Posts:

how to drop XLA_GLT temporary Tables in EBS

How To Manage, Reduce, and/or Purged The FND_LOBS

2 thoughts on “Purge obsolete logs in oracle EBS r12”

  1. Hi, thanks for the post, i was also reading note 2005894.1 and it says you first has to stop app tier, and you dont do it in your note. Is it safe to delete files without stopping apptier?
    regards

    Reply
  2. Thanks for you valuable comment. We are always purging old logs using -mtime +30 instead of rm -rf * (complete logs including current). In doc mentioned rm -rf * , It means will remove entire logs. So, if you are using rm -rf * . You should shutdown middle Tier and do the purging activity as well.

    Reply

Leave a Comment