转贴:ORA-01034 ORA-27121 错误
ORA-01034: ORACLE not availableORA-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
========================
ORA-01034 ORA-27121 13: Permission denied
ORA-01034
ORA-27121
Error: 13: Permission denied
双实例 两个实例
日月明王 http://sunmoonking.spaces.live.com
环境
HP-UX jmc080 B.11.11 U 9000/800 1805586595 unlimited-user license
SQL*Plus: Release 9.2.0.1.0 - Production on Mon Oct 16 16:48:45 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 – Production
装两个数据库
db1
和
db2,
分别有两个用户
db1user
和
db2user
,分别属于
ORADBA1,ORADBA2,
共同属于
oragroup
安装组。装好两个库后出现如下错误
现象
SQL> connect db2user/db2user@db2
ERROR:
ORA-01034: ORACLE not available
ORA-27121: unable to determine size of shared memory segment
HP-UX Error: 13: Permission denied
此时
$ ls -alt $ORACLE_HOME/bin/oracle
Warning! One or more of your selected locales are not available.
Please invoke the commands "locale" and "locale -a" to verify your
selections and the available locales.
Continuing processing using the "C" locale.
-rwsrwsrwx 1 oracle1 oragroup 77765688 Sep 7 16:00 /usr/sap3/oracle/product/920/bin/oracle
(原权限是
6751
)
如果把
/usr/sap3/oracle/product/920/bin/oracle
的所有者改成
oracle2
则可以启动
DB2
,但是
DB1
却出现同样错误,无法连接。于是判断是某个文件的权限不对。于是一步一步检查。
看谁拥有内存
$ ipcs -a
IPC status from /dev/kmem as of Mon Oct 16 18:05:13 2006
T ID KEY MODE OWNER GROUP CREATOR CGROUP CBYTES QNUM QBYTES LSPID LRPID STIME RTIME CTIME
Message Queues:
q 0 0x3c200731 -Rrw--w--w- root root root root 0 0 65535 0 0 no-entry no-entry 19:46:07
q 1 0x3e200731 --rw-r--r-- root root root root 0 0 264 0 0 no-entry no-entry 19:46:07
T ID KEY MODE OWNER GROUP CREATOR CGROUP NATTCH SEGSZ CPID LPID ATIME DTIME CTIME
Shared Memory:
m 0 0x412007a8 --rw-rw-rw- root root root root 0 348 607 607 19:46:17 19:46:17 19:46:11
m 1 0x4e0c0002 --rw-rw-rw- root root root root 1 61760 607 607 19:46:13 19:46:17 19:46:11
m 2 0x411809a4 --rw-rw-rw- root root root root 1 8192 607 619 19:46:13 19:46:11 19:46:11
m 3 0x30203ebc --rw-rw-rw- root root root root 2 1048576 1282 1302 19:49:19 no-entry 19:48:40
m 17412 0x5e14045d --rw------- root root root root 1 512 1667 1667 19:49:13 no-entry 19:49:13
m 312325 0x7bf2fe68 --rw------- oracle1 users oracle1 users 13 873955328 20914 22016 18:04:49 18:04:49 16:22:30
m 4102 0x36ba48e8 --rw-rw---- oracle2 users oracle2 users 14 706183168 21014 21991 18:03:37 18:03:37 16:26:16
T ID KEY MODE OWNER GROUP CREATOR CGROUP NSEMS OTIME CTIME
Semaphores:
s 0 0x412007a8 --ra-ra-ra- root root root root 1 19:46:17 19:46:11
s 1 0x4e0c0002 --ra-ra-ra- root root root root 2 19:46:13 19:46:11
s 2 0x411809a4 --ra-ra-ra- root root root root 2 no-entry 19:46:11
s 3 0x00446f6e --ra-r--r-- root root root root 1 no-entry 19:46:50
s 4 0x00446f6d --ra-r--r-- root root root root 1 no-entry 19:46:50
s 5 0x01090522 --ra-r--r-- root root root root 1 no-entry 19:47:09
s 6 0x41207339 --ra-ra-ra- root root root root 1 19:48:35 19:48:35
s 7 0x31203ebc --ra-ra-ra- root root root root 1 19:49:19 19:48:40
s 8 0x611804f5 --ra-ra-ra- root root root root 1 19:53:03 19:49:04
s 9 0x731804f5 --ra-ra-ra- root root root root 1 19:59:47 19:49:04
s 10 0x701804f5 --ra-ra-ra- root root root root 1 19:53:43 19:49:04
s 11 0x691804f5 --ra-ra-ra- root root root root 1 19:53:01 19:49:04
s 12 0x751804f5 --ra-ra-ra- root root root root 1 19:49:04 19:49:04
s 13 0x631804f5 --ra-ra-ra- root root root root 1 19:49:04 19:49:04
s 14 0x641804f5 --ra-ra-ra- root root root root 1 19:53:04 19:49:04
s 15 0x661804f5 --ra-ra-ra- root root root root 1 no-entry 19:49:04
s 16 0x6c1804f5 --ra-ra-ra- root root root root 1 19:53:03 19:49:04
s 17 0x6d1804f5 --ra-ra-ra- root root root root 1 19:59:47 19:49:04
s 18 0x6f1804f5 --ra-ra-ra- root root root root 1 no-entry 19:49:04
s 19 0x410c01e0 --ra-ra-ra- root root root root 1 19:49:09 19:49:09
s 20 0x00000001 --ra-ra-ra- root root root root 1 19:49:49 19:49:13
s 21 0x4528e5bf --ra-ra-ra- root root root root 1 no-entry 19:49:19
s 22 0x4528e5c0 --ra-ra-ra- root root root root 1 19:49:19 19:49:19
s 23 0x521804f5 --ra-ra-ra- root root root root 1 19:59:47 19:53:04
s 182624 0xfc6c0898 --ra------- oracle1 users oracle1 users 154 18:05:06 16:22:32
s 49825 0xa01e08b0 --ra-ra---- oracle2 users oracle2 users 154 18:04:44 16:26:17
没看出什么明显问题。
首先设置
UMAKS 000
在设置
/var/opt/oracle/oratab
为
DB1:/usr/sap3/oracle/product/920:Y
DB2:/usr/sap3/oracle/product/920:Y
再
chown -R oracle1:oragroup $ORACLE_BASE
chmod -R 777 $ORACLE_BASE
chmod 6777 $ORACLE_HOME/bin/oracle