Karen:
I've used two methods:
1) search for the string "export complete" in the last 5 lines of the dbexport file:
dbexport testdb -c -ss -t /dev/tape -b 32 -s 2000000
cnt=`tail -5 ./dbexport.out|grep -i "dbexport completed"|wc -l`
if [ $cnt = 1 ];then
echo "\n Successfully ended database export @ `date`...\n"|tee -a $log
else
echo "\ndbexport failed! Check dbexport.out file for error message @ `date`.
fi
2) dbexport like most all unix commands sets the exit code, $?, to zero if it completes properly or non-zero if it doesn't:
dbexport testdb ....
if [ "$?" -eq 0 ]
then echo "dbexport worked"
else echo "dbexport failed"
fi
The easiest way of simulating an error is interrupting the dbexport process and answering "Y"es to the abort question. Also, a dbexport fails if a user or other process is using the database you're trying to export.
Regards,
Ed
Schaefer