Tuesday, September 8, 2015

sqlplus command not found and ORACLE NOT FOUND after Database installed on Linux

After installing Oracle Database on Linux  machine, if you are getting command not found error on typing sqlplus, try the following

Open terminal and set the following properties

export ORACLE_HOME=/opt/app/oracle/product/12.1.0/dbhome_1
export ORACLE_SID=DEV
export PATH=$PATH:$ORACLE_HOME/bin

alternatively goto /home/oracle  ( user home)

on the terminal type ln -a

This will show .bash_profile

open .bash_profile using vi command

vi .bash_profile

add the following line to .bash_profile

export ORACLE_HOME=/opt/app/oracle/product/12.1.0/dbhome_1
export ORACLE_SID=DEV
export PATH=$PATH:$ORACLE_HOME/bin

save the file and run

source .bash_profile

Goto  /opt/app/oracle/product/12.1.0/dbhome_1/bin

 type lsnrctl start to start the db services

After setting this  open terminal  type sqlplus

The command not found error will not appear now

now type start this will start the database

$sqlplus > startup

sqlplus> connect / as sysdba

enter the username/password 

Now the ORACLE NOT FOUND error will disappear

1 comment: