RE: SQLLoader from Procedure

RE: SQLLoader from Procedure

 

  

You would use an external table, which gives us the ability to query a file
as if it were a database table. So, a call to SQLLDR from PL/SQL becomes
simply on 'INSERT INTO table SELECT * FROM external_table'.
A quick and easy way to get started with external tables is to take some of
your control (CTL) files and convert them into external table definitions:
'SQLLDR user/pass example.ctl external_table=generate_only'
In example.log file, we'll find:
- A CREATE DIRECTORY statement. External tables require a database
directory object.
- A CREATE TABLE statement for the external table. This will have
your converted SQL Loader script embedded in it.
- An INSERT statement that does the loading.
- A pair of DROP statements to clean up.
You'll edit this CREATE TABLE statement to give the external table whatever
name you like, change the directories, and so on. Certainly, better if you
use PARALLEL on this statement.

Ciao


-----Mensaje original-----
De: chandrashekar [mailto:chandrashekar.[Email address protected]
Enviado el: jueves, 03 de abril de 2008 9:36
Para: RICARDO.[Email address protected]
Asunto: 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


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