Thanks for everyone's response on my other thread!
About the sqlldr.exe exitting problem, I found out that the sqlldr.exe exits only when it is executed on the same machine as the oracle database server.
I am connecting to the database from aclient machine, the client machine also has the oracle client edition installed. so when I call the sqlldr.exe, it uses the client copy. I have test it many times, it doesn't work on the client machine doesn't matter whether I put 'EXIT' at the end of the sqlldr script or not.
To make my question clear, I will explain what I am doing below. :
There are 3 machines in this scenario:
1) client machine
2) web server machine
3) database server
My project only has two parts,
1) a .csv data file is uploaded to the web server machine from the client machine
2) invoke the sql loader to load data from the .csv file to the database.
My question is:
Can I invoke the sqlldr.exe on the database server machine to load the data file from a different machine(the web server machine in this case, you know, not all client machines have oracle install. )? How?
Is this procedure is onetime situation or you need to automate this procedure as part of your project.
First case, you can ftp the file to the location you wanted and do load from there.
Later case you might need to automate it using some stored procedures and calling sql*ldr, keeping the file in utl_file_dir location. Iam not good in PL/SQL, Just its idea to my level of PL/SQL knowledge. I could be even wrong. Thought of mentioning it, hoping it throw some light on PL/SQL experts.
well I dont know what do you mean exactly, since your topic says if sqlldr could be executed from other machines rather than the database server itself but at the end of your post you said if you could load data by using sql loader in database server reading a *.dat from another machine
Well if it was first case you can load the data remotely, actually I always load data with sql loader from client machine, but I do it in NT and it always exists after it finishes... of course I do this manually not from any scripts, not sure about your situation.
As second I have never tried it but I guess you could as long as you can see the *.dat in the network?
if the sql*loader has to run on the DB server machine, ftp the files (*.csv) to the DB macine. Then invoke the "rsh" on the webserver to call the shell program (which has the sqlldr) on the DB server.
I don't know whether its the correct solution, but I believe "rsh" can invoke commands (such as sqlldr) on another machine.
Click Here to Expand Forum to Full Width