Oracle环境变量命令讲解
输入命令:ll –all
输入命令:vi .bash_profile
#.bash_profile
# Get thealiases and functions
if [ -f~/.bashrc ]; then
. ~/.bashrc
fi
# Userspecific environment and startup programs
PATH=$PATH:$HOME/bin
exportPATH
exportORACLE_SID=orcl
exportORACLE_HOME=/usr/lib/oracle/11.2/client64
exportTMP=/tmp
exportTMPDIR=$TMP
exportPATH=$PATH:$ORACLE_HOME/bin
exportLANG=”en_US”
exportTNS_ADMIN=$ORACLE_HOME/network/admin; #重点,设置tnsnames.ora连接
完整变量参数:
ORACLE_BASE=/u01/app/oracle;export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1;export ORACLE_HOME
ORACLE_SID=ORCL;export ORACLE_SID
ORACLE_TERM=xterm;export ORACLE_TERM
TNS_ADMIN=$ORACLE_HOME/network/admin;export TNS_ADMIN
PATH=$ORACLE_HOME/bin:$PATH;export PATH
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG
#exportNLS_LANG=AMERICAN_AMERICA.AL32UTF8
LC_CTYPE=zh_CN.GBK;export LC_CTYPE
LC_ALL=zh_CN.UTF8;export LC_ALL
LANG=zh_CN.GBK;export LANG
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jdk/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
export CLASSPATH