Computing.Net > Forums > Unix > sql Loader

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

sql Loader

Reply to Message Icon

Name: Raghu Raja (by raghuraja_r)
Date: August 9, 2006 at 04:44:40 Pacific
OS: unix
CPU/Ram: P4/512MB
Product: Intel
Comment:

Hi
I need to automate an sql loader process in unix. i already have an control file, data file.
All I need is to write a unix shell script. that accepts userid and pwd. it must set the oracle_home and call the sqlldr.
i have tried it but getting "ORACLE_HOME is not an valid identifier" error.
I will invoke this script from Appworx scheduler.

Thanks in advance


Thanks & Regards
Raghu Raja



Sponsored Link
Ads by Google

Response Number 1
Name: James Boothe
Date: August 9, 2006 at 08:19:16 Pacific
Reply:

Please post your script.


0

Response Number 2
Name: Raghu Raja (by raghuraja_r)
Date: August 10, 2006 at 02:39:15 Pacific
Reply:

export LD_LIBRARY_PATH=/opt/oracle/product/9.2.0.5/lib:$LD_LIBRARY_PATH
export ORACLE_HOME=/opt/oracle/product/9.2.0
export PATH=/opt/oracle/product/9.2.0.5/bin:$PATH
sqlldr userid = ${userid=ops$NGPTQMS/JA3743@evncpad1.ae.ge.com}
control = ${/evncpaq1/apps/cp/cm/r11.5.10/geae/gl/include/PAY0001_test.ctl}
data = ${/evncpaq1/data/infile/mon_gross_det.dat}
log = ${/evncpaq1/data/infile/mon_gross_det.log}
discard = ${/evncpaq1/data/infile/mon_gross_det.dis}
#bad = ${BAD_FILE}
errors = 999

if [$ ? -ne 0]
then echo "Error ! The sql loader call failed "
exit 1
fi

when i execute
$ sh m_load.sh
i am getting err as
m_load.sh: LD_LIBRARY_PATH=/opt/oracle/product/9.2.0.5/lib:: is not an identifier

Thanks & Regards
Raghu Raja


0

Response Number 3
Name: lchi2000g
Date: August 10, 2006 at 20:40:31 Pacific
Reply:

I found some other errors in the script.

The correct one is as follows: (The space is important most of time in script and there is no blanks after \)

export LD_LIBRARY_PATH=/opt/oracle/product/9.2.0.5/lib:$LD_LIBRARY_PATH
export ORACLE_HOME=/opt/oracle/product/9.2.0
export PATH=/opt/oracle/product/9.2.0.5/bin:$PATH

sqlldr userid=ops$NGPTQMS/JA3743@evncpad1.ae.ge.com \
control=${/evncpaq1/apps/cp/cm/r11.5.10/geae/gl/include/PAY0001_test.ctl} \
data=${/evncpaq1/data/infile/mon_gross_det.dat} \
log=${/evncpaq1/data/infile/mon_gross_det.log} \
discard=${/evncpaq1/data/infile/mon_gross_det.dis} \
errors=999

#bad=${BAD_FILE} \

if [ $? -ne 0 ]; then
echo "Error ! The sql loader call failed "
exit 1
fi


Luke Chi


0

Response Number 4
Name: Raghu Raja (by raghuraja_r)
Date: August 11, 2006 at 04:01:29 Pacific
Reply:

Thanks Luke and james for your efforts and replies.
actually my user name is "ops$ngptqms"
since $ngptqms refers to variable. i replaced it with "ops\$ngptqms" now its working fine.

Thanks & Regards
Raghu Raja


0

Response Number 5
Name: lchi2000g
Date: August 11, 2006 at 06:29:26 Pacific
Reply:

Good to know that.


Luke Chi


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: sql Loader

Read File name and pass to SQLoader www.computing.net/answers/unix/read-file-name-and-pass-to-sqloader/5543.html

Unix shell script and Oracle data www.computing.net/answers/unix/unix-shell-script-and-oracle-data/5298.html

Cron job www.computing.net/answers/unix/cron-job/3191.html