Using sqlldr in pl/sql

Brad P

Member
I would like to create a procedure to call/execute sqlldr in pl/sql. Currently, I'm running a bat file in a dos window. Am I able to call/execute a bat file in a pl/sql procedure? Thanks in advance... bproffitt
 
Just for sure, the pl/sql-procedure running on the server cannot access anything on your client machine. pl/sql can start programs on operating system level on the server, but it is complicated. The shortest description I know has 5 pages.
Why don't you use external tables to load data? This is much more easy!

Regards
6502
 
I'm uploading a 80gig, 500 text files into 500 tables. Then applying primary keys, foreign keys and indexing. Is external tables a viable option?
 
Not sure if this helps, but you can call your batch file from within PL/SQL Developer via the menu: Tools -> Configure Tools...
 
I'll check that out. Thanks,

The goal is to run a scheduled job on my 11g with multiple steps of which one of them is to upload the data.
 
External Tables use the same mechanism and ctl-syntax as the sql-loader. The syntax of the ctl-file is placed in the table description. The only thing I haven't tried yet is to provide multiple datafiles to one external table, as it is possible with the loader.

If you schedule your steps using dbms_job, external tables are easier to handle, cause there is no action outside the database.

6502
 
Back
Top