Why all the fuss about having to be in a pl/sql procedure or package.
Until Oracle becomes an OS, why not leverage what is there?
Calls to external programs can be made. You would have to create a
shared library for your shell, then create a wrapper to call it with the
call to sqlldr. Environment variables would be needed in the
tnsnames.ora file. You will hate supporting this and your security
folks will absolutely freak out. But since you asked, please refer to
metalink note 99136.1
-----Original Message-----
From: chandrashekar
[mailto:oracledba-ezmlmshield-x32286624.[Email address protected]
Sent: Thursday, April 03, 2008 2:36 AM
To: LazyDBA Discussion
Subject: RE: SQLLoader from Procedure
Hi Ricardo,
Thanks for scripts, but its pure Shell scripting write. My case is
little different. I will get particular table name and Target database
details. On based on that I need to transfer data to target location,
from Local procedure in oracle I need to do all these process by using
SqlLoader (I need invoke SQL Loader command from Procedure).
Is there any way to handle this?
Thanks,
Chandu
-----Original Message-----
From: Ricardo Chaves
[mailto:oracledba-ezmlmshield-x17736109.[Email address protected]
Sent: Thursday, April 03, 2008 12:46 PM
To: LazyDBA Discussion
Subject: RE: SQLLoader from Procedure
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
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
***********************
No virus was detected in the attachment no filename
Your mail has been scanned by InterScan.
***********-***********
************************************************************************
************************************************************************
*********************
"This message and any attachments are solely for the intended recipient
and may contain Birlasoft confidential or privileged information. If you
are not the intended recipient,any disclosure,copying, use, or
distribution of the information included in this message and any
attachments is
prohibited. If you have received this communication in error, please
notify us by reply e-mail at ([Email address protected] and permanently
delete this message and any attachments. Thank you."
************************************************************************
************************************************************************
*********************
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
______________
The information contained in this message is proprietary and/or confidential. If you are not the
intended recipient, please: (i) delete the message and all copies; (ii) do not disclose,
distribute or use the message in any manner; and (iii) notify the sender immediately. In addition,
please be aware that any message addressed to our domain is subject to archiving and review by
persons other than the intended recipient. Thank you.
_____________
Oracle LazyDBA home page