Home » RDBMS Server » Server Administration » need to understand why do i need these line in my script
need to understand why do i need these line in my script [message #57381] Tue, 10 June 2003 13:40 Go to next message
sidd
Messages: 130
Registered: May 2003
Senior Member
What is the significance of the following, why these are written on top of my sqlloader script, all it does is it runs a sqloader command in a shell script, why do i need these lines on top of it? i need to understans help me. Thanks..
LINES:
#!/usr/bin/ksh
ORACLE_SID='d618'
export ORACLE_SID
ORACLE_HOME=`cat /etc/oratab&#124grep ^$ORACLE_SID:&#124cut -f2 -d':'`
export ORACLE_HOME
PATH=$ORACLE_HOME/bin:/opt/netscape:$PATH
export PATH
sqlldr u....

please i need to understand this..
Re: need to understand why do i need these line in my script [message #57383 is a reply to message #57381] Tue, 10 June 2003 14:09 Go to previous messageGo to next message
Sanjay
Messages: 236
Registered: July 2000
Senior Member
In these lines you are setting sys variables to run your sqlldr with out errors.

Line 1 : you are using Korn Shell
Lines 2-3 : setting ORACLE_SID and exporting it
Lines 4-5 : setting ORACLE_HOME and exporting it
Lines 6-7 : setting PATH and exporting it
Line 8 is your SQLLdr command

Cheers.
Re: need to understand why do i need these line in my script [message #57384 is a reply to message #57383] Tue, 10 June 2003 14:25 Go to previous messageGo to next message
sidd
Messages: 130
Registered: May 2003
Senior Member
How these commands works, i need that buddy, i know what they are doing there, but how they are working, i need that. Thanks for your info. please if you explain if you can,
Re: need to understand why do i need these line in my script [message #57388 is a reply to message #57384] Tue, 10 June 2003 23:59 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Well, what's the problem then? How they are working is part of the Korn Shell.

you simply create a few variable pairs and export them to the environment so that the next commands can use them. there's nothing more to it. you probably need the ORACLE_SID, ORACLE_HOME and PATH environmental variables. It's like in DOS, where you can SET variables too.

MHE
Previous Topic: colde back after Stop Oracle services or shutdown?
Next Topic: How to count number of transactions
Goto Forum:
  


Current Time: Fri Sep 20 11:39:25 CDT 2024