Hi,
I am running a simple shell script through Datastage as a BEFORE ROUTINE.
This is the script.
sqlplus -s username@engt1/password <<EOF
execute useradmin.msp_loader.drop_index('rnkt0','attendance',null,'ALL');
EOF. I have put this in a shell script called drop_index.ksh and it is present in the path /app03/engineering/dpr on my unix box. So I am executing the shell script as BEFORE ROUTINE(ExecSH).But I get the following error
Afterjobroutine..BeforeJob (ExecSH): Error when executing command: /app03/engineering/dpr/drop_index.ksh
*** Output from command was: ***
/app03/engineering/dpr/find_date.ksh: sqlplus: not found. I searched the forum and got the below result. But I really couldn't fix my problem with the below solution
viewtopic.php?t=89449&highlight=sqlplus%3A+not+found
Can anyone of you please let me know what can be done about this?
Thanks in Advance.
Regards,
Dprasanth
Run shell script(fr Ds) that contains a call to sqlplus
Moderators: chulett, rschirm, roy
sqlplus is not in the path for the DS engine process. Check the path in the dsenv file in the DSEngine directory. The DS engine was started without the path in the environment file that can find the Oracle binaries. Fix that and you fix your problems.
The other method is to reference the binaries directly in your script, or add to the path yourself the Oracle binaries directory.
The other method is to reference the binaries directly in your script, or add to the path yourself the Oracle binaries directory.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
I had added the $ORACLE_HOME/bin in dsenv PATH and LD_LIBRAY_PATH and had executed dsenv. But still it is complaning.kcbland wrote:sqlplus is not in the path for the DS engine process. Check the path in the dsenv file in the DSEngine directory. The DS engine was started without the path in the environment file that can find the Oracle binaries. Fix that and you fix your problems.
The other method is to reference the binaries directly in your script, or add to the path yourself the Oracle binaries directory.
These are my entries in dsenv
ORACLE_HOME=/usr/oracle/product/9.2.0.6; export ORACLE_HOME
PATH=$DF30DIR/bin:$PATH:$ORACLE_HOME/bin.
I had added the PATH through DS Adminstrator in the ENVIORNMENT VARIABLES. But still it is complaining
At worst case, add it to your script - either that or put a fully pathed (instead of a relative one) reference to sqlplus there.
You don't literally have a dot at the end of 'bin' in your dsenv file, do you? Make sure you export the new PATH as well.
dprasanth wrote:These are my entries in dsenv
ORACLE_HOME=/usr/oracle/product/9.2.0.6; export ORACLE_HOME
PATH=$DF30DIR/bin:$PATH:$ORACLE_HOME/bin.
You don't literally have a dot at the end of 'bin' in your dsenv file, do you? Make sure you export the new PATH as well.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Sorry to trouble you all... I had added all the entries in the dsenv file, but I forgot to restart the DS serviceschulett wrote:At worst case, add it to your script - either that or put a fully pathed (instead of a relative one) reference to sqlplus there.
dprasanth wrote:These are my entries in dsenv
ORACLE_HOME=/usr/oracle/product/9.2.0.6; export ORACLE_HOME
PATH=$DF30DIR/bin:$PATH:$ORACLE_HOME/bin.
You don't literally have a dot at the end of 'bin' in your dsenv file, do you? Make sure you export the new PATH as well.
I restarted the DS services and the script started working. Thanks a lot for your time
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: