Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: sqlldr: non-direct load empty files?
Christof Kaiser <kaiser_at_logiball.deREMOVETHIS> wrote in message news:<3B20A68F.A33F898D_at_logiball.deREMOVETHIS>...
> Hi,
>
> I have an empty data file. When I load it (TRUNCATE) with DIRECT=TRUE
> with sqlldr (8.1.6) it works fine, 0 Logical Records are loaded.
> But for some reason, I have to swich off the direct=true.
> However, with everything else the same I get
>
> SQL*Loader-501: Unable to read file (XXX.dat)
> SQL*Loader-561: end of file
>
> How can I load an (possibly) empty file with sqlldr?
> The length of the file is 0.
>
> Ragrads
> Christof
I think I understand the question as I take it you want the job to run without returning an error when there is no data to process. I do not run sqlldr very often so there may be a better answer but in your script you could check the file size and if it is 0 then skip the load step. This will bypass the error.
If you are not providing them, try adding the error and bad file parameters and see if that eliminates your error.