|
-
The easiest way to do such things is creating a shell-script in Unix,
that will check if a file exists and then start sql-loader.
The script can be scheduled in the CRONTAB.
Something like this:
#!/bin/sh
function LoadFile
{
# Start SQL loader
sqlldr userid=user/passwd \
control=$CNTL_FILE \
data=$DATA_DIR/$1 \
log=$LOG_DIR/$1.log \
bad=$BAD_DIR/$1.bad \
discard=$DSC_DIR/$1.dis \
rows=100000 >> $vLogFile
trc=$?
return 0;
}
########### Here it starts ###########
filetypes=`cat $FILE_DIR/cmafiles.lis`
for currtype in $filetypes
do
LoadFile $currtype
rm $FILE_DIR/$currtype
done
Success
Regards
Ben de Boer
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|