首页  >  文章  >  数据库  >  oracle 11g在CentOS 5.5上安装以后,sqlplus不能使用

oracle 11g在CentOS 5.5上安装以后,sqlplus不能使用

WBOY
WBOY原创
2016-06-07 15:18:521321浏览

假如我的安装路径如下:/home/lxm/app/lxm/product/11.2.0/dbhome_1/bin 那么在/home/lxm/.bash_profile 文件中添加如下内容: export ORACLE_BASE=/home/lxm/app/lxm export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1 export ORACLE_SID=orcl expo

假如我的安装路径如下:/home/lxm/app/lxm/product/11.2.0/dbhome_1/bin

 

那么在 /home/lxm/.bash_profile
文件中添加如下内容:
export ORACLE_BASE=/home/lxm/app/lxm
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=orcl    
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

 

然后执行:soruce  /home/lxm/.bash_profile
使其生效即可

输入sqlplus /nolog

出现如下提示:

[lxm@wn7-lcg /]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Mon Oct 15 14:10:56 2012

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

SQL>

就成功了

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn