Try to create a shell-script in Unix that will check if a file exists and
then start sql-loader... 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
Ciao
-----Mensaje original-----
De: chandrashekar
Enviado el: martes, 01 de abril de 2008 16:41
Para: LazyDBA Discussion
Asunto: RE: SQLLoader from Procedure
Hi Oracle Gurus,
Can any one help me on below issue? I want execute SQL Loader command
from procedure. I tried RUN, $ and HOST commands in SQLPLUS window its
working but I am unable to execute same from procedure.
I am desperately waiting for your suggestions.
Thanks,
Chandu
-----Original Message-----
From: Chandrashekar N
Sent: Tuesday, April 01, 2008 11:11 AM
To: 'LazyDBA Discussion'
Subject: SQLLoader from Procedure
Hi All,
Can any one tell me how can I Execute SQL Loader Command from Oracle
Procedure?
Thanks,
Chandu
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.22.5/1356 - Release Date: 02/04/2008
16:14
Oracle LazyDBA home page