Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to invoke sql*Loader from PL/SQL?

Re: How to invoke sql*Loader from PL/SQL?

From: <pbolduc_at_my-deja.com>
Date: Tue, 14 Dec 1999 06:53:58 GMT
Message-ID: <834pi5$hgq$1@nnrp1.deja.com>

I have done similar thing. I used a Pro*C program written by Scott Urman (PL/SQL Programming, Oracle Press) that runs as a daemon process on the Unix host. It listens on dbms_pipe for messages, which can be system calls. The Pro*C program then can do a system() call to run SQL*Loader. See info on DBMS_PIPE package and daemon.pc Pro*C program in chapter 8 of ORACLE Server Applic. Developers Guide.

Basic idea is:

[PL/SQL] -> [dbms_pipe] -> [Pro*C] -> [Unix Command]

Phil Bolduc
North Vancouver, BC Canada

In article <3852B5EC.5138820D_at_home.com>,   jpquinn_at_home.com wrote:
> Hi, I have only used SQLLoader via SQL*Plus via HP-Unix terminal, I
use it
> to load external crafted files into Tables. I too would like to know
if
> ther eis a way to execute it through PL/SQL, but I'm not wanting to do
> anything quite so fancy as you. I'm just loading tables with ASCII
files.
> Thx, Q MailTo:jpquinn_at_home.com
>
> Michael Daskaloff wrote:
>
> > Hi all,
> > I'd be very happy if someone can offer me a way to invoke SQL*Loader
> > from
> > Stored PL/SQL on Oracle8 on HP-UX.
> > If someone has already done this I'll be very hapy to know how.
> >
> > I have an idea to create an external library and invoke some
procedure
> > written in C,
> > which creates a control file and execs SQL*Loader. Does someone
know is
> > this possible. If someone has already done this can you give me some
> > advice (or better - sources if not too offensive).
> >
> > Thanks in advance.
> > Michael Daskaloff
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Dec 14 1999 - 00:53:58 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US