2008-09-25

Ubuntu配置Oracle-xe sqlplus

Ubuntu配置Oracle-xe sqlplus
1、设置ORACLE_HOME。
# ORACLE_HOME
export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID=XE

2、解决oracle以外的用户使用sqlplus连接服务器时的Linux Error: 13: Permission denied错误。

遇到 ORA-27121 错误
ORA-01034: ORACLE not available
ORA-27121: unable to determine size of shared memory segment
Linux Error: 13: Permission denied

主要是因为oracle安装程序没有给oracle这个可执行程序设置正确的setuid。这样设置一下:

$ cd $ORACLE_HOME/bin
$ chmod 6751 oracle

结果类似这样就行了。

$ ls -l $ORACLE_HOME/bin/oracle
-rwsr-s--x 1 oracle oinstall 23352783 Aug 14 2001 /home/oracle/app/oracle/product/8.1.6/bin/oracle

没有评论: