What about the environment?
You may need to set the Oracle environment like this:
Code:
logfl=$filename.log.$MYTIME
badfl=$filename.badfile
datfl=$MYFILE
dscfl=$filename.discard
user=$SECUID/$SECPWD@$SECSID
ctlfl=/control/$filename.ctl
ORAENV_ASK=NO
export ORACLE_SID=$SECSID # Or a local SID if $SECSID is remote.
. /usr/local/bin/oraenv
echo " Loading table $filename "
sqlldr $user $ctlfl log=$logfl bad=$badfl data=$datfl discard=$dscfl
rc=$?
echo .
echo " Completed loading into $filename return code = $rc "
"The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb