#!/bin/ksh # locktracker # Copyright 2000, All Rights Reserved, Reed-Matthews, Inc. # You'll need to call your own environmental file and change directory structures to run this . /u01/oraprod.env export LOCKTRACKER=$RMINC_TOP/sql if [ -a $RMINC_TOP/sql/locktracker_semaphore ]; then echo "`date`: locktracker ALREADY running, NOT restarted..." >>$RMINC_TOP/sql/lockhist; else echo "" >> $RMINC_TOP/sql/lockhist; echo "`date` --- Starting locktracker execution ------" >>$RMINC_TOP/sql/lockhist; echo "Do not remove this file." >>$RMINC_TOP/sql/locktracker_semaphore; sqlplus apps/apps @$RMINC_TOP/sql/locktracker.sql 0 rtv=$? echo "Return=$rtv" if [ $rtv -gt 0 ]; then echo '^G\c' >> $RMINC_TOP/sql/lockhist; cat $RMINC_TOP/sql/locktracker.temp1 |grep CONT >> $RMINC_TOP/sql/lockhist; cat $RMINC_TOP/sql/locktracker.temp7 |grep XREF >> $RMINC_TOP/sql/lockhist; echo '^G\c' >> $RMINC_TOP/sql/lockhist; else echo "******************************************** No lockseekers found ........" >> $RMINC_TOP/sql/lockhist; fi rm $RMINC_TOP/sql/locktracker_semaphore; echo "`date` --- Finished locktracker execution ------" >> $RMINC_TOP/sql/lockhist; fi ###