Login  Register

sqlloader not running

classic Classic list List threaded Threaded
4 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

sqlloader not running

Roshan
1294 posts
This post was updated on May 02, 2017; 10:03am.
Oracle Database 12c
Red Hat Linux 6

Hi,

I am running a sqlloader script from crontab. In the log file, I am getting
/home/jesh/MOB_DATA_jesh.sh: line 1: sqlldr: command not found

My bash profile is as follows

export ORACLE_HOME=/archicom/products/oracle/12.1.0/dbhome_1
export ORACLE_SID=ARCHICOM
export PATH=$PATH:$ORACLE_HOME/bin
#PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PS1='archicom>'
export PATH

Regards,
Roshan
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: sqlloader not running

ErmanArslansOracleBlog
Administrator
5731 posts
The shell environment of your script can not see the sqlldr.
It is related with the PATH env variable of your script's shell environment.

sqlldr is located in $ORACLE_HOME/bin

The environment must be set in the .bash_profile of the OS user that is executing the script or inside the script itself..
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: sqlloader not running

Roshan
1294 posts
Thanks :)
It is working now. I set the environment variables in script
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: sqlloader not running

ErmanArslansOracleBlog
Administrator
5731 posts
In reply to this post by ErmanArslansOracleBlog
Aha..
You are asking it for crontab.

Well, you can still set your env inside the script, but if you want to have that env inside the cron, you can set env variable in your crontab file.

Example:

crontab -e

ORACLE_HOME2=/erm
3 * * * * echo $ORACLE_HOME2 >/tmp/erm   --just for testing the ORACLE_HOME2 is set inside the cron.