From: Eric on
On 2010-02-19, z1hou1 <z1hou1(a)gmail.com> wrote:
> Thank you all for your suggestions. While I could resolve this issue
> in more ways than one and definitely in ways suggested by ddf, Tony
> Sequeira and David Fitzjarrell, I was actually curious why sqlldr had
> this difference in behavior for accessing a file without a "." and/or
> an extension between Unix and Windows. And I was particularly
> intrigued why sqlldr could not recognize such a file, while the Unix
> ls command recognized the same file without an extension or the
> period.

Because in Unix, there is no such thing as a file extension, a file just
has a name, which may contain a period if you like, and the name is all
that ls cares about. Some Unix programs (originally just the build chain)
found extensions to be useful (make was designed around using them)
but they are not necessary even in many of the cases where they are
always used.

Oracle was designed to be portable to anything that had a decent C
compiler, by having an operating system dependent layer (all the names
beginning with osd or osn that you see in error trace files). Mostly
the layer is pretty good, but sometimes it has to stretch a bit (or
even a lot), and I'm sure there are some odd edge cases that most
people never see.

> .
> Whatever I am doing is part of something large and runs under a
> framework that invokes tools with parameters, in this case it is
> sqlldr, a control file and a data file. The sqlldr not being able to
> handle a file without a period or an extension came as a bit of a
> shock. Having said that, I was actually appalled to see a formal file
> part of a daily process given to the downstream system without an
> extension.
> .
> I simply told the upstream people to give the downstream system the
> same file with an extension and keep the solution simple and pre-
> processing down to a minimum. If that is refused, yes, I will go with
> a small amount of pre-processing and move on.
> .
> It is apparent that sqlldr on Unix/Solaris cannot recognize a filename
> without an extension. I was well aware of the .dat assumption. But the
> windows implementation threw me off - where it recognizes a file
> without any extension or the period as long as we said
> data=<filename>. (period in the end).

I think the normal behaviour is that if you provide an extension, it
should be used, if you don't, the relevant default is used. I don't know
what actually happens with just the dot, but I would not be surprised at
different behaviour for different OSs. It should be the same code for
all the "traditional" utilities (sqlldr, sqlplus, exp, imp, rpt ...).

Eric