sqlplus in shell script

Hi

When I use sqlplus in shell script, I get sqlplus: command not found.

ORACLE_HOME is not set. How to set ORACLE_HOME in unix?

Thanks

Prior that, check whether oralce is installed or not.

ps -ef | grep pmon

If ORACLE is installed ORACLE_HOME will be set by admins normally. If not you have to set a value to it and put it .profile/.chsrc file

When I run this command ps -ef | grep pmon, I get 2 outputs, one is 'myuser' and the other one as 'oracle' user

Depending on the version an installationtype of Oracle there may be a script oraenv that takes care of setting up the needed environment. Source that script:

. oraenv

As the pmon process is running on your box I guess the rdbms is installed and not just the client. If the Oracle-version is 8.1.7 or higher the script should reside at /usr/local/bin unless you use Oracle Express.