I am very much an Oracle newbie and was hoping for some guidance.
I'm trying to run the following statement in Oracle 8.1:
sqlldr user/password control=loadctls/control.ctl direct=true
(To be completely accurate, I'm running it in PERL through:
system("sqlldr user/password control=loadctls/control.ctl direct=true");
However, I'm getting the following message back:
'Can't exec "sqlldr": No such file or directory at runcontrol.pl line 320.'
The file "control.ctl" does exist and is in the "loadctls" directory. (I've also tried using the full directory path, but the message does not change. The sqlldr function has worked fine before on this system.
I think you are right that it does not recognize sqlldr.
>As per what u have stated here, seems that sqlldr does not exist in
I checked my path in System Variables and see that "C:\oracle\ora81\bin" is listed there. (I am running in a client/server environment.) I searched my computer and found SQLLDR.EXE in that same directory.
>It seems that the system is not able to recognize sqlldr command ...
>why dont u specify the full path of the sqlldr in the exec("")
I am not sure how to do this. The path to SQLLDR is on the local client and I'm telnetting to a server to run the commands. (I think you are getting to the root of the problem.)
>Where exactly are running the perl command/file
>i.e. where are you running the exec.
I am running the perl command file on a UNIX server that I am telnetting to from my Windows 2000 client. (I telnet to the server on which resides the perl command file, the sqlldr control file, and the data file called by the control file.)
>The path should include the directory where sqlldr exists.
My local (Windows) client path does include the directory that contains the sqlldr.exe file ("C:\oracle\ora81\bin").
>Since you said you are telnetting to the server, I would assume that
>the perl file/command is being run on the same machine.
Yes, the perl file is being run on the server where it resides.
>If yes, you need to check if the path includes sqlldr on the server
I don't understand this part. The sqlldr.exe file is local. (I just tried placing it into the server directory with the Perl file and also modified my Windows path to include my mapping to the UNIX server directory, but still get the same message.)
I am still stuck here with the sqlldr problem. I believe that Aruneesh is on the right track and that it is a system/environment related problem, but I do not know how to proceed and solvethis problem.
OK if you are running the PERL script on the server but you have sqlldr on your PC then its going to be a bit difficult for the perl script on your server to see sqlldr on your pc.
You either need sqlldr exe to be on the server and in the path on the server (if it is unix/linux type 'set' to see the path). You may need to install the oracle client if the Oracle database doesnt reside on it.
Or run your perl script on your PC and specify the database using