(unknown charset) Re: A(nother) SQL loader question

From: (unknown charset) Re <RegBurgess_at_Lucent.com>
Date: Wed, 11 Apr 2001 10:40:15 -0400
Message-ID: <3AD46CCE.2CFE82CA_at_Lucent.com>


Thanks Mike,
What I had  NEGLECTED  to say was that space is at a premium on the system that is running Oracle, so I was trying to avoid loading the the n-gigabyte file.  I would REALLY like to load many thousands of 300 - 500 byte files and not keep them around on the database machine.

Reg
 

Mike, S. wrote:

> On Tue, 10 Apr 2001 12:09:53 -0400, Reg <RegBurgess_at_Lucent.com> wrote:
>
> Reg,
>
> I don't know of a way to do it with just SQL*Loader, but here's an
> approach that should work if the files all have different names.
>
> Create a batch file that calls an archive utility to gather the files
> into one directory. Then concatenate the files and call SQL*Loader to
> import the combined file.  Assuming the files all have the extension
> .TXT (for example), the commands with the version of PkZip I use would
> be
>
> pkzip -r arcfile *.txt
> pkunzip arcfile
> copy *.txt bigfile.dat
> sqlldr <your options here> data=bigfile.dat
> del bigfile.dat
> del *.txt
> del arcfile.zip
>
> The "-r" switch for PkZip means recurse through subdirectories. Since
> the "-p" switch is not included, PkZip doesn't store the paths.
> Therefore the files all end up at the same "level" in the .ZIP file.
> PkUnzip then extracts them into the current directory where they are
> concatenated into bigfile.dat and loaded into Oracle. HTH
>
> Mike S.
>
> >I know the basics, I'm having trouble figuring out how to use wildcards
> >for filenames.  (In windoze NT).
> >
> >I have a directory tree, below a certain level it contains ONLY
> >datafiles that I want to load into the same table.  The number of files
> >is unknown it is likely to vary from day to day, the number of directory
> >
> >levels is not yet known, but is probably 3 or 4, this may be fixed but
> >has not yet been determined, e.g. there could be a directory level that
> >has files and sub-directories I need to include the files and the files
> >in all directories below.
> >
> >So, basically I want to walk the tree, collect all files and sqlload
> >append them to the table.
> >Hints, clues, suggestions are welcome - I've tried reading the manuals,
> >I may have missed it so pointers are also appreciated.
> >
> >\R
> >
> >
> >
Received on Wed Apr 11 2001 - 16:40:15 CEST

Original text of this message