3、Ora_Q3_bash: sqlpl

bash: sqlplus: command not found 解決方法

環境變數已經配好,但是仍報錯:

# vi  .bash_profile

# .bash_profile

# Get the aliasesand functions

if [ -f ~/.bashrc ];then

        . ~/.bashrc

fi

# User specificenvironment and startup programs

PATH=$PATH:$HOME/bin

#AddORACLE_SID ,ORACLE_BASE,ORACLE_HOME AND PATH

exportPATH

unsetUSERNAME

exportEDITOR = vi

exportORACLE_SID = orcl

export ORACLE_BASE = /u01/app/oracle

exportORACLE_HOME = $ORACLE_BASE/product/11.2.0/dbhome_1/

export PATH = $PATH:/u01/app/oracle/product/11.2.0/dbhome_1/bin

umask 022

【解決方法】

# su -root

# ln -s /u01/app/oracle/product/11.2.0/dbhome_1/bin/sqlplus  /usr/bin

# su  - oracle

$sqlplus/nolog

SQL>conn  / as sysdba

Connected to an idleinstance.

SQL>startup

ORACLEinstance started.

……

Database mounted.

Databaseopened.

Tags: