Calling SQL Loader in Java
843798Dec 3 2002 — edited Dec 4 2002I am writing a Java application running on SUN Solaris to perform data feed from a number of csv files to ORACLE. I am to use SQL Loader to perform the loading. What I need is to kick off the SQL Loader in my code. My question is how to kick off the SQL Loader in Java.
One of option I am thinking is using RunTime.Exec(). Is the following code workable?
runtime.exec( "sqlldr CONTROL=foo.ctl, LOG=bar.log, USERID=scott/tiger" );
Althernatively should I write a Oracle store procedure to call the SQL Loader and Java call the store procedure?
Any thoughts and directions are welcome!
Regards,