-bash: sqlplus: command not found


Oracle S/W is installed on Unix server, but  below error message is there.

[oracle@~]$ sqlplus

-bash: sqlplus: command not found

Solution:

Go to ORACLE_HOME (Path where oracle is installed). To find ORACLE_HOME use http://www.dbas-oracle.com/2011/05/what-is-oraclehomename-and-how-to-find.html

[oracle@~]$ cd /opt/oracle/product/11.2.0/dbhome_1/

[oracle@ dbhome_1]$ export ORACLE_HOME=/opt/oracle/product/11.2.0/dbhome_1

[oracle@dbhome_1]$ cd bin/

[oracle@ bin]$ ./sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on Tue Oct 11 20:53:19 2011

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

To permanent  fix this add following entries into .bash_profile file at /home/oracle location.

ORACLE_HOME=/opt/oracle/product/11.2.0/dbhome_1
export ORACLE_HOME
PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export PATH

7 comments:

  1. why ./sqlplus? you might try just sqlplus

    ReplyDelete
  2. Hi Friend, Till now, $PATH variable is not set, so you need to use ./sqlplus. If you will set $PATH variable, then you need not to use this as suggested in permanent fix of this problem.

    by the way, thanks for your comment.

    ReplyDelete
  3. Replies
    1. thanks it works like charm

      Delete
    2. u are great man...but why i have to run . . /.bash_profile command again before running sqlplus as / sysdba

      Delete