TWS job is getting abended

263 views Asked by At

While executing the job, I am getting below error Job.sh is the script - while executing it in tws I am getting below error

path of the script - job.sh: sqlplus: not found

Can any please help on this

Thanks

2

There are 2 answers

1
splease On

I don't know how Tivoli works, but you are writing to run a "job.sh" script, so I assume it is a shell script. Normally when working with oracle it is a good idea to enter absolute paths, so your script could be

   #!/bin/sh
   $ORACLE_HOME=<your path of oracle installation>
   $ORACLE_SID=<your instance name>
   $PWD=<Position of your sql script>
    ..........
   $ORACLE_HOME/bin/sqlplus login/password @$PWD/script.sql

I hope that's what you were looking for.

0
Mark Chanthavong On

You are using the Unix variable @$PWD in the PATH for the sdript.sql. TWS doesn't use any variable in the .profile file by default. You can do two things to correct this:

  1. Added the TWS command as ". /home/.profile;@$PWD/script.sql"
  2. Update /home/.jobmanrc with all variable from the .profile.

The .jobmanrc is the TWS job run-control file.