-1

I have installed oracle correctly and also set ORACLE_HOME correctly on server,still sqlplus command is not working in my PC while it is working in others PC. I think I missed out some important step can you tell me what should I do ?

 $ echo $ORACLE_HOME
/u01/app/oracle/product/11.2.0/dbhome_1

This following is error message:

$ sqlplus
bash: sqlplus: command not found
4

Export the PATH variable. You have missed that.

PATH=$ORACLE_HOME/bin:$PATH
export PATH
  • There are also other variables which can be useful - ORACLE_SID, ORACLE_BASE (amongst others) - see here. – Vérace Aug 31 '15 at 6:42
  • @Mat Still not working.I think there should be about loading the environment variables and that but I don't know how to load environment variables.. – Paresh Zawar Aug 31 '15 at 8:46
  • Edit your .bashrc and then run the command "source ~/.bashrc". That should do it. – Vérace Oct 9 '15 at 9:49
2

Edit your Unix bash config file ~/.bashrc or ~/.profile, and add the following to it:

export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH

You'll need to open a new shell to see the changes take effect.

That will modify the setting for just the current user. If you want to make the changes applicable to all users system-wide, put the above lines in /etc/profile or /etc/bashrc.

1

copy and paste as it is:

export PATH=$PATH:$ORACLE_HOME/bin  
export LD_LIBRARY_PATH=$ORACLE_HOME/lib  
export TNS_ADMIN=$ORACLE_HOME/network/admin
-1
$ export ORACLE_HOME=/u1/db/db1800/product/18.0.0/dbhome_1
$ export PATH=$ORACLE_HOME/bin:$PATH
$ export ORACLE_SID=PDB
$ sqlplus sys/sys@PDB as sysdba

This should work

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.