成長空間

          MiLife

          常用鏈接

          統計

          積分與排名

          Automation Testing Development

          最新評論

          轉貼:ORA-01034 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


          ========================

          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
          裝兩個數據庫db1db2,分別有兩個用戶db1userdb2user,分別屬于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

          posted on 2009-01-11 14:55 Picasso 閱讀(2329) 評論(0)  編輯  收藏 所屬分類: Unix

          主站蜘蛛池模板: 宜川县| 长宁区| 历史| 瑞金市| 依兰县| 伊宁县| 蒙城县| 仙桃市| 宁乡县| 黔西| 遂溪县| 仁化县| 威远县| 城固县| 阿勒泰市| 邢台市| 夏河县| 玛曲县| 麻栗坡县| 韶关市| 临海市| 喀喇| 岐山县| 新干县| 城步| 临邑县| 和静县| 高州市| 文化| 桂平市| 岫岩| 永定县| 千阳县| 武清区| 齐河县| 息烽县| 广平县| 射阳县| 上杭县| 宿松县| 永康市|