Thanks in advance for any help.
I have a script which we use to copy Oracle Archive Logs across the network
from one machine to another
The script has now started to give an error "more tokens expected"
It runs under ksh.
Does this mean anyhting to anyone ?
Andy Hillis
#***************************************************************************
****
#*
#*==========================================================================
====
#* Copyright (c) Mentec, 1999
#* All Rights Reserved
#*==========================================================================
====
#*
#* Project Code : CTS_990120_0
#*
#* Client : CTS
#*
#* Title : Apply Archive log
#*
#* Version : 1.0
#*
#* Filename : apply.sh
#*
#* Purpose :
#* To apply archive logs from phara1200 to the standby
#* database on phara800
#*
#* Usage : apply.sh &
#*
#* Parameters
#*
#* 1
#* 2
#* 3
#* 4
#*
#* Technical Notes :
#*
#*
#*
#*
#*
#* Change History
#***************************************************************************
****
#* Date Developer Ver Comments
#***************************************************************************
****
#* 24-Jun-1999 J.P. Glover 1.0 Initial Creation
#***************************************************************************
***/
PRIMARYSITE=phara1200
LOG_ARCHIVE=/archive
export PRIMARYSITE LOG_ARCHIVE
while true
do
LASTAPPLIED=$(ls $LOG_ARCHIVE | tail -1)
LASTAPPLIED1=$(echo /archive/$LASTAPPLIED | cut -c16-25)
NEXTTOAPPLY=$(expr $LASTAPPLIED1 + 1)
NEWESTARCHIVE=$(rsh $PRIMARYSITE cat $LOG_ARCHIVE/latest.arc)
export NEWESTARCHIVE NEXTTOAPPLY
if (($NEXTTOAPPLY <= $NEWESTARCHIVE)) then
for ARCHIVE in $(echo $NEXTTOAPPLY $NEWESTARCHIVE | \
awk '{for(i=$1;i<=$2;i++) {printf("T0001S%010d.arc\n",i)}}')
do
echo "applying " $ARCHIVE
rsh $PRIMARYSITE dd if=$LOG_ARCHIVE/$ARCHIVE | dd
of=$LOG_ARCHIVE/$ARCHIVE
/usr/users/oracle/recover.sh
done
fi
sleep 180
done
____________________________________________________
Confidentiality Advice: This e-mail transmission
may contain confidential or legally privileged
information that is intended only for the individual
or entity named in the e-mail address. If you are not
the intended recipient, please reply to the sender,
so that Galen Holdings PLC can arrange for
proper delivery, and then please delete the message
from your inbox.
If you have received this e-mail transmission in error,
you are hereby notified that any disclosure, copying,
distribution, or reliance upon the contents of this
e-mail is strictly prohibited. Thank you.
Received on Wed Apr 12 2000 - 09:29:41 NZST