Re: How to call SQLLoader from a job?

From: Hans Forbrich <news.hans_at_telus.net>
Date: Thu, 21 Oct 2004 17:43:57 GMT
Message-ID: <xzSdd.23664$_u6.1872_at_edtnps89>


[Quoted] Robert Scheer wrote:

> Hi.
>
> Once a day, I need to read data from a text file into a table in my
> Oracle database. I have been searching for examples on how to
> configure a job to run the SQLLoader utility, but could not find one.
> Can anyone point me to any kind of example about jobs and SQLLoader?
>
> Thanks,
>
> Robert Scheer

[Quoted] If by 'jobs' you mean you're looking for DBMS_JOB to run SQL Loader, did you remember that SQL*Loader runs from the OS whereas DBMS_JOB (and 10g's DBMS_SCHEDULER) runs from inside the database.

Oracle's solution in 9i, and older, is to run Loader, Export, Import, etc. jobs through the "Intelligent Agent" - hence [part of] the need to enter an OS userid/password in the OEM config. (Seems still true in 10g, except now it's the 'Management Agent'.)

A common *nix ethod is to use cron. If you don't want to or don't have cron (or equivalent for your OS) you could go through some hoops to have a PL/SQL callout to a .dll or .so (extproc).

However, a simpler solution might be to use 'External Tables'. These are discussed in depth in the Utilities manual - close to the SQL Loader discussion.

/Hans Received on Thu Oct 21 2004 - 19:43:57 CEST

Original text of this message