Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Adding addidional hard drive and attach it to a linux box. Linux/Unix
  • cache buffer chain latch Oracle
  • load SPM baseline from cursor cache Oracle
  • When to rebuld B-tree index Oracle
  • Explain Plan Output 2 Oracle
  • On solaris 10, “S” link is not part of $ORACLE_HOME/bin/oracle as default. ( For 9.2.0.8) Oracle
  • Adding a new disk and mount it automatically. on VMWARE LINUX Linux/Unix
  • Postgres DB user and OS user. POSTGRESQL
  • useful dg links Oracle
  • Jai Shree Ram Oracle
  • Rman Notes -1 Oracle
  • Removing Ctrl-M from end of line using vi Linux/Unix
  • Finding last recovered file on DR and remove all chanracters before any “/” Linux/Unix
  • How to find who is using which Rollback segment and how many rows or blocks in that rollback segments, Oracle
  • Set Role explaination. Oracle

age_alert.ksh aging out alert.log

Posted on 28-Feb-2006 By Admin No Comments on age_alert.ksh aging out alert.log

!/bin/ksh

. /export/home/oracle/envs/oracle_env_PNETP

save_date=`date +%Y%m%d%H%M`

# Set ORATAB variable

if [ -f /etc/oratab ] ; then

ORATAB=/etc/oratab

else

if [ -f /var/opt/oracle/oratab ] ; then

ORATAB=/var/opt/oracle/oratab

else

echo “”

echo “`date` Cannot find oratab!”

echo “”

exit 2

fi

fi

export ORATAB

# search the alert log for errors for all databases

#

for ORACLE_SID in `grep -v “^#” $ORATAB | grep -v “^$” | grep -v “*” | grep -v “BLINK” | grep -v “BLOOM” | grep -v “BLINKTEST” | grep -v “B80

6″ | cut -d: -f1`

do

ALERTLOG=${ORA_BDUMP}/alert_${ORACLE_SID}.log

TEMPLOG=/export/home/oracle/scripts/log/alert_tmp_${ORACLE_SID}.log

# Age the alert log

#

mv ${ALERTLOG} $ORA_BDUMP/alert_$ORACLE_SID.log_$save_date

#

touch ${ALERTLOG}

rm ${TEMPLOG}

touch ${TEMPLOG}

# purge all alert logs older than 2 weeks

#

find $ORA_BDUMP/alert* -mtime +14 -exec rm {} ;

#

done

Linux/Unix, shell

Post navigation

Previous Post: cur_sql.sql
Next Post: Flowers Resize datafiles

Related Posts

  • oracle_env_10g_CADEV Linux/Unix
  • note id 373303.1 Linux/Unix
  • send email from unix mailx with attachment. Linux/Unix
  • send attachment from unix-shell script Linux/Unix
  • Passing from Unix to PLSQL using bind variables Linux/Unix
  • xargs use Linux/Unix

Leave a Reply Cancel reply

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

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Django (0)
  • GIT (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (400)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (18)
  • rman-dataguard (26)
  • shell (150)
  • SQL scripts (348)
  • SQL Server (6)
  • Uncategorized (3)
  • Videos (0)

Recent Posts

  • Running PDB on single node in RAC09-Apr-2026
  • find_arc.sql09-Apr-2026
  • pvm_pre_change.sql08-Apr-2026
  • find_encr_wallet.sql08-Apr-2026
  • find_pdbs.sql08-Apr-2026
  • Creating a Container Database using dbaascli08-Apr-2026
  • track_autoupgrade_copy_progress.sql01-Apr-2026
  • refre.sql for multitenant01-Apr-2026
  • prepfiles.sh for step by step generating pending statistics files10-Mar-2026
  • tracksqltime.sql05-Mar-2026

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • sql_doing_fts.sql Oracle
  • Check SQL Server edition SQL Server
  • useful dg links Oracle
  • cache buffer chain latch Oracle
  • find_encr_wallet.sql Uncategorized
  • Guide to Linux System Command Mastery Linux/Unix
  • VIvek Encryption Package and Its Usage Oracle
  • Good notes for shared pool Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme