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

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Loader on Linux need help writing a script

Re: SQL Loader on Linux need help writing a script

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 09 Jan 2002 21:50:06 +0100
Message-ID: <g2bp3u4jgfoifdpq87dq61dtenpmvc26v9@4ax.com>


On Wed, 09 Jan 2002 20:40:07 GMT, "Jennifer" <Jennifer_at_DAG[DELETEME].ca> wrote:

>I was given the task to load a delimeted text files into oracle. I choose
>to use SQL Loader, created a control file for each text file and then
>combined the commands in a batch file that I execute. The batch file looks
>like this:
>
>
>::Importing data to tables
>d:\oracle\bin\sqlldr scott/tiger_at_database
>control=e:\Navigator\studentinfo.ctl
>d:\oracle\bin\sqlldr scott/tiger_at_database
>control=e:\Navigator\studentcourse.ctl
>d:\oracle\bin\sqlldr scott/tiger_at_database
>control=e:\Navigator\studentregistration.ctl
>
>This works great except that now I find out O/S is linux base and not
>Windows and my .bat file won't work and I need to write a linux script
>instead of
>a .bat file. I know nothing about unix and was wondering if any body would
>send me one so I can see what it would need to look like.
>thanks
>jennifer_champagne_at_hotmail.com
>
>
>

sqlldr scott/tiger_at_database  /Navigator/studentinfo.ctl
sqlldr scott/tiger_at_database /Navigator/studentcourse.ctl
sqlldr scott/tiger_at_database /Navigator/studentregistration.ctl

assuming $ORACLE_HOME has been set and your $PATH is correct (Your code shows it isn't on NT)
Just paste this in a textfile
chmod +x textfile
./textfile
and that is all

Hth

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address Received on Wed Jan 09 2002 - 14:50:06 CST

Original text of this message

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