Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> hi stephen,

hi stephen,

From: Narender Akula <Narender.Akula_at_telecom.co.nz>
Date: Wed, 12 Jul 2000 11:06:50 +1200
Message-Id: <10555.111738@fatcity.com>


hi stephen,
You can do this by writing a shell script. I have done this by loading = multiple infiles
at commnad line.=20

usage $junk_load.sh a.ctl b.ctl c.ctl
----------junk_load-----

SPOOLFILE=3D/tmp/junk_load.$$  =20
INFILES=3D$*                   =20
DDAT=3D$$.`date "+%Y%m%d"`     =20
LOGFILE=3D/tmp/ctel_load.$DDAT =20
CTLFILES=3D`ls -1 $INFILES 2>/dev/null`                    =20
                                                          =20
if [ ! "$CTLFILES" ]                                     =20
then                                                      =20
        echo "ERROR. $INFILES not found."                 =20
        echo "$0 cancelled at `date`"                     =20
        exit 1                                            =20
fi                                                        =20
                                                          =20
#More than one file could be found, so process all of them.
for i in $CTLFILES                                       =20
do                                                        =20
echo "Processing $i..."         =20

sqlload userid=3Dscott/tiger control=3D$i data=3Ddata1.txt silent=3Dheade= r,feedback errors=3D10000 bad=3D/tmp/$i.bad log=3D/tmp/$i.log=20 done
  echo "$0 completed at `date`" =20

you have to modify this scrit for your requirement. Hope you need another = loop for data files as well.

bye=20
NAREN

                                                  =20

>>> dgoulet_at_vicr.com 12/July/2000 10:02am >>>
I believe the parameter is "data=3D<whatever>" on the command line. Not = sure if
you can specify multiple datafiles (or at least I haven't tried).

Dick Goulet

____________________Reply Separator____________________
Author: "Stephen Andert" <StephenAndert_at_firsthealth.com>
Date:       7/11/00 11:10 AM

Can I use a variable in the INFILE string in a CTL file for sqlloader?

i.e. the line currently reads:

INFILE '/m17/oradata/work/qtr1/db_file1.ing'

and I would to have something like=20

X =3D '/m17/oradata/work/qtr1'

INFILE $X/db_file1.ing

The reason is that I have 32 ctl files and am loading data for many = different
qtr's and am changing the ctl files every time. I guess it might be = easier to
just move the data files into a temp directory for loading, then move them = out
when done and move the next batch in. =20

Thoughts?

Stephen Andert

--=20
Author: Stephen Andert
  INET: StephenAndert_at_firsthealth.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). --=20
Author:=20
  INET: dgoulet_at_vicr.com
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may Received on Tue Jul 11 2000 - 18:06:50 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US