#!/bin/bash

. /home/oracle/.bash_profile

export log=/u01/app/oracle/shells/clean_rdbms_audit.log

echo $ORACLE_HOME | tee $log
echo “DELETING AUDIT LOGS FROM RDBMS” | tee -a $log
date | tee -a $log
df -m $ORACLE_HOME | tee -a $log
/bin/find /u01/app/oracle/ -type f -name “*.trc” -mtime +1 -exec rm {} \;
find $ORACLE_BASE/admin -type f -name “*.aud” -mtime +5 -exec rm {} \;
find $ORACLE_BASE/diag/rdbms -type f -name “*.trc” -mtime +1 -exec rm {} \;
find $ORACLE_BASE/diag/rdbms -type f -name “*.trm” -mtime +1 -exec rm {} \;
find $ORACLE_BASE/diag/rdbms -name “*_lmhb_*.tr?” -exec rm {} \;
sleep 10
df -m $ORACLE_HOME | tee -a $log
echo “END OF DELETING AUDIT LOGS” | tee -a $log
date |tee -a $log
exit 0;

Leave a Reply

Your email address will not be published. Required fields are marked *