This script accepts a transaction file and dbname as parameters, and applies the data
#!/usr/bin/ksh
#-------------------------------------
# Sybase database loader
# Parms: database, log dump file
#-------------------------------------
if test $# -lt 2
then
echo " "
echo "usage:"
echo "------"
echo "syb_applylog <dbname> <dump file>"
echo " "
echo " "
exit
fi
if test ! -f $2 ; then
echo " "
echo "Invalid dump file: "
echo $2
echo " "
exit
fi
echo "-----------------------------------------------"
echo "`date`"
echo "**** Loading transaction dump file ..." $2
eval /apps/sybase/bin/isql -SFocal1 -I/apps/sybase/interfaces -Ujsmith -Pyankees << finis
load transaction $1 from '$2'
go
finis
echo "-----------------------------------------------"
echo "`date`"
echo '**** Load complete.'
|
|