标签:
db2oracle日月明王数据库 |
分类: ORACLE |
ORA-01034
ORA-27121
Error: 13: Permission denied
双实例 两个实例
日月明王
环境
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
-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
此时问题解决,虽然最终没有找到是哪个文件的权限问题。