Bash: sqlplus: commandnotfound (1) environment variables have been configured, but the error is still reported: [oracle @ dg1 ~] $ Vi. bash_profile #. bash_profile # Getthealiasesandfunctionsif [-f ~. Bashrc]; then .~. Bashrcfi # Userspecificenvironmentandstartupp
Bash: sqlplus: command not found solution (1) the environment variable has been configured, but the error is still reported: [oracle @ dg1 ~] $ Vi. bash_profile #. bash_profile # Get the aliases and functions if [-f ~ /. Bashrc]; then .~ /. Bashrc fi # User specific environment and startup p
Bash: sqlplus: command not found solution (1)
The environment variable has been configured, but an error is still reported:
[Oracle @ dg1 ~] $ Vi. bash_profile
#. Bash_profile
# Get the aliases and functions
If [-f ~ /. Bashrc]; then
.~ /. Bashrc
Fi
# User specific environment and startup programs
PATH = $ PATH: $ HOME/bin
Export PATH
Unset USERNAME
Export EDITOR = vi
Export ORACLE_SID = dg1
Export ORACLE_BASE =/u01/app/oracle
Export ORACLE_HOME = $ ORACLE_BASE/product/10.2.0/db_1
Export LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib
ExportPATH =/u01/app/oracle/product/10.2.0/db_1/bin:/usr/sbin:/usr/local/bin: /usr/X11R6/bin
Export PATH = $ ORACLE_HOME/bin: $ PATH
Umask 022
Solution:
[Oracle @ dg1 ~] $ Sqlplus/nolog
Bash: sqlplus: command not found
[Oracle @ dg1 ~] $ Ln-s $ ORACLE_HOME/bin/sqlplus/usr/bin
Ln: creating symbolic link '/usr/bin/sqlplus' to '/bin/sqlplus': Permissiondeni ed
[Oracle @ dg1 ~] $ Su-root
Password:
[Root @ dg1 ~] # Ln-s $ ORACLE_HOME/bin/sqlplus/usr/bin
[Root @ dg1 ~] # Su-oracle
[Oracle @ dg1 ~] $ Sqlplus/nolog
SQL * Plus: Release 10.2.0.1.0-Production on Mon May11 12:51:24 2009
Copyright (c) 1982,200 5, Oracle. All rightsreserved.
SQL> conn/as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 167772160 bytes
FixedSize 1218316 bytes
VariableSize 79694068 bytes
Database Buffers 83886080 bytes
RedoBuffers 2973696 bytes
Database mounted.
Database opened.
SQL>
Bash: sqlplus: command not found solution (2)
Environment variable:
[Oracle @ ocmdb2 ~] $ Cat. bash_profile
#. Bash_profile
# Get thealiases and functions
If [-f ~ /. Bashrc]; then
.~ /. Bashrc
Fi
# User specificenvironment and startup programs
PATH = $ PATH: $ HOME/bin
Export PATH
Unset USERNAME
ExportORACLE_BASE =/u01/app/oracle
ExportORACLE_HOME =/u01/app/oracle/product/10.2.0/db_1
Error:
[Oracle @ ocmdb2bin] $ sqlplus/as sysdba
-Bash: sqlplus: command not found
Solution:
Add in parameter file
ExportPATH = $ PATH: $ ORACLE_HOME/bin
The reason is that the script of the sqlplus application is located in this folder.