Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to correct the bash profile after using the wrong path

Rhine23Feb 18 2015 — edited Feb 26 2015

Hi Guys

I want to know after I installed 12c on linux 6.5 I tried connecting to sqlplus on the CLI but I couldn't

After reading around i followed these steps below.

[oracle@obi1 ~]$ ps -ef | grep -i pmon

oracle   19824     1  0 10:33 ?        00:00:00 ora_pmon_orcl

oracle   20791 20627  0 11:19 pts/5    00:00:00 grep -i pmon

[oracle@obi1 ~]$ pwdx 19824

19824: /home/oracle/app/oracle/product/12.1.0/dbhome_1/dbs

[oracle@obi1 ~]$ export ORACLE_SID=orcl

[oracle@obi1 ~]$ export ORACLE_HOME=/home/oracle/app/oracle/product/12.1.0/db_1/dbs

[oracle@obi1 ~]$ sqlplus / as sysdba

-bash: sqlplus: command not found

Then i tried to run it again as show below only this time i added "/opt" in-front of the paths

[oracle@obi1 ~]$ export ORACLE_SID=orcl

[oracle@obi1 ~]$ export PATH=$PATH:/opt/home/oracle/app/oracle/product/12.1.0/dbhome_1/dbs/bin

[oracle@obi1 ~]$ export ORACLE_HOME=/opt/home/oracle/app/oracle/product/12.1.0/db_1/dbs

[oracle@obi1 ~]$ sqlplus / as sysdba

[oracle@obi1 ~]$ sqlplus / as sysdba

-bash: sqlplus: command not found

But now when I try to run any command even "ls"  or "whoami" I get the -bash command not found. I think I messed up the bash profile

Any ideas on how I could fix this so that i could sqlplus into the database on linux

Thank you kindly.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 26 2015
Added on Feb 18 2015
5 comments
742 views