solaris创建了用户组dba,其下用户名oracle,用oracle用户登陆solaris,并安装ORACLE。
ORACLE安装成功后,创建了数据库mc,sid也为mc。
在solaris上,连接ORACLE数据库:$echo $ORACLE_SID
mc
$sqlplus / as sysdbaSQL*PLus: Release 10.2.0.1.0 - Production on Mon Mar 7 11:05:41 2011 CopyRight (c) 1982, 2005, Oracle. All rights reserverd.Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production 
With the Partitioning, OLAP and Data Mining optionsSQL> select * from dual;D
-
xSQL>显示已经连接成功,并用 select * from dual 作了测试。
然而,我在windows XP上测试连接mc时(TNS for 32-bit Windows: 10.2.0.1.0):
Net Manager测试连接,报错:初始化首次测试请使用用户名: scott, 口令: tiger
正在尝试使用以下用户 ID 连接:scott
测试没有成功。
ORA-01034: ORACLE not available
ORA-27121: unable to determine size of shared memory segment
SVR4 Error: 13: Permission denied在输入的字段中可能有错误, 
或者服务器连接未就绪。 
其中,TNS是这样:
MC_10_75_9_18 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.75.9.18)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SID = mc)
    )
  )
windows XP端连接报错是怎么回事呢?求教,谢谢大家了!

解决方案 »

  1.   

    对不起,说漏了,在安装ORACLE时,在“指定操作系统组名”下拉列表中,选择的是'dba'组。
      

  2.   

    没有权限,在服务器端先用scott用户,看是否能够连续,
    一般情况下,scott用户默认是锁定的
      

  3.   

    首先确认客户端和服务器版本匹配问题
    其次TNSPING 看是否连通,
    然后连接,是否报错,错误号
      

  4.   

    查看一下你的solaris上的$ORACLE_HOME/bin权限
    是不是chmod 6751 即-rwsr-s--x,以及你的oracle的用户和工作组的信息是不是oracle用户,dba组
      

  5.   

    --杀掉oracle相关的进程
    oracle@bfdx-dsg:[/oracle]ps -ef|grep $ORACLE_SID| \
    > grep -v grep|awk '{print $2}'|xargs -i kill -9 {}oracle@bfdx-dsg:[/oracle]ps -ef|grep ora
      oracle 430180 639092   0 09:53:27  pts/1  0:00 sqlplus
      oracle 639092 635114   0 09:53:21  pts/1  0:00 -ksh
      oracle 671800 663674   0 10:00:38  pts/0  0:00 -ksh
      oracle 680058 671800   0 10:01:05  pts/0  0:00 grep ora
      oracle 692434 671800   0 10:01:05  pts/0  0:00 ps -ef--清除数据库占用的内存段
    oracle@bfdx-dsg:[/oracle]ipcrm -m 8388617
    ipcrm: 0515-021 shmid(8388617): The user does not have the appropriate privileges to perform this operation.oracle@bfdx-dsg:[/oracle]exitbfdx-dsg:root:/acct>ipcs -pmb
    IPC status from /dev/mem as of Fri May 16 10:03:14 BEIDT 2008
    T        ID     KEY        MODE       OWNER    GROUP     SEGSZ  CPID  LPID
    Shared Memory:
    m         0 0x58002034 --rw-rw-rw-     root   system 134217728 61596 278664
    m   1048577 0x52e74b4f --rw-rw-rw-   imnadm   imnadm     36028 422096 422096
    m   1048578 0x9308e451 --rw-rw-rw-   imnadm   imnadm     97948 422096 422096
    m   1048579 0xe4663d62 --rw-rw-rw-   imnadm   imnadm        96 422096 422096
    m         4 0xc76283cc --rw-rw-rw-   imnadm   imnadm     42268 422096 422096
    m         5 0x298ee665 --rw-rw-rw-   imnadm   imnadm      2844 422096 422096
    m         6 0xffffffff --rw-rw----     root   system      4096 381128 381128
    m         7 0x78000019 --rw-rw-rw-     root   system  16777216 483570 483570
    m         8 0x0d003a64 --rw-rw----     root   system      1440 344086 635114
    m   8388617 0xc4d142b0 --rw-r-----      205      204 6442467328 618702 692432
    m   1048586 0x00005643 --rw-rw-rw-     root   system      1024 659660 688262
    m   1048587 0x00005654 --rw-rw-rw-     root   system      1024 659660 688262bfdx-dsg:root:/acct>ipcrm -m 8388617
    bfdx-dsg:root:/acct>su - oracle
    oracle@bfdx-dsg:[/oracle]sqlplus '/as sysdba'SQL*Plus: Release 10.2.0.2.0 - Production on Fri May 16 10:03:35 2008
    Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.
    Connected to an idle instance.SQL> startup nomount
    ORACLE instance started.Total System Global Area 6442450944 bytes
    Fixed Size                  2080904 bytes
    Variable Size            2013269880 bytes
    Database Buffers         4412407808 bytes
    Redo Buffers               14692352 bytesOK,问题解决。
      

  6.   

    遇到 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
      

  7.   

    看看以下命令的执行结果再说吧:
    #su - oracle
    $lsnrctl status
      

  8.   

    谢谢大家了,不好意思,刚才吃饭去了:)
    C:\Documents and Settings\Administrator>tnsping 10.75.9.18TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 07-3月 -
    2011 12:30:48Copyright (c) 1997, 2005, Oracle.  All rights reserved.已使用的参数文件:
    D:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora已使用 EZCONNECT 适配器来解析别名
    Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=10.75.9.18))(ADDR
    ESS=(PROTOCOL=TCP)(HOST=10.75.9.18)(PORT=1521)))
    OK (30 毫秒)
      

  9.   


    服务器端在scott解锁后可以连接,然而在XP客户端依然报如上的错误。
      

  10.   

    不好意思,我刚接触solaris,oracle是之前同事装的,我只是在上面建了个数据库:
    有点多:)
    /oradata/oracle/product/10.2.0/Db_1
    $ ls -l $ORACLE_HOME/bin
    total 499218
    -rwxrwxrwx   1 oracle   dba        11160 May 12  2005 DBConsole.pm
    -rwxrwxrwx   1 oracle   dba        18276 May 12  2005 EMAgent.pm
    -rwxrwxrwx   1 oracle   dba        21870 May 12  2005 EMDeploy.pm
    -rwxrwxrwx   1 oracle   dba        28704 Oct  9 10:05 EmctlCommon.pm
    -rwxrwxrwx   1 oracle   dba        15632 May 12  2005 IASConsole.pm
    -rwxrwxrwx   1 oracle   dba        13100 Jul  8  2005 adapters
    -rwxrwxrwx   1 oracle   dba         1669 May 12  2005 agentok.sh
    -rwxrwxrwx   1 oracle   dba        69776 Oct  9 10:05 agtctl
    -rwxrwxrwx   1 oracle   dba            0 Aug 13  2005 agtctlO
    -rwxrwxrwx   1 oracle   dba         1566 Oct  9 10:02 aqxmlctl
    -rwxrwxrwx   1 oracle   dba         6768 Nov  4  2004 aqxmlctl.pl
    -rwxrwxrwx   1 oracle   dba         3099 Apr  5  2005 asmcmd
    -rwxrwxrwx   1 oracle   dba       214856 May 21  2005 asmcmdcore
    -rwxrwxrwx   1 oracle   dba         1996 Oct  9 10:02 bndlchk
    -rwxrwxrwx   1 oracle   dba         1692 Oct  9 10:02 clscfg
    -rwxrwxrwx   1 oracle   dba      1835232 Jul 24  2005 clscfg.bin
    -rwxrwxrwx   1 oracle   dba         1692 Oct  9 10:02 clsfmt
    -rwxrwxrwx   1 oracle   dba      1093480 Jul 24  2005 clsfmt.bin
    -rwxrwxrwx   1 oracle   dba         1692 Oct  9 10:02 clsid
    -rwxrwxrwx   1 oracle   dba      1720256 Jul 24  2005 clsid.bin
    -rwxrwxrwx   1 oracle   dba          736 Oct  9 10:02 cluvfy
    -rwxrwxrwx   1 oracle   dba          110 Oct  9 10:05 commonenv
    -rwxrwxrwx   1 oracle   dba           82 May 12  2005 commonenv.bat.template
    -rwxrwxrwx   1 oracle   dba          121 Aug 14  2005 commonenv.template
    -rwxrwxrwx   1 oracle   dba         2857 Jan  1  2000 coraenv
    -rwxrwxrwx   1 oracle   dba         1692 Oct  9 10:02 crsctl
    -rwxrwxrwx   1 oracle   dba      1973808 Jul 26  2005 crsctl.bin
    -rwxrwxrwx   1 oracle   dba       432952 Jul  8  2005 csscan
    -rwxrwxrwx   1 oracle   dba            0 Jun 22  2005 csscanO
    -rwxrwxrwx   1 oracle   dba       632976 Jul  8  2005 ctxkbtc
    -rwxrwxrwx   1 oracle   dba       571336 Oct  9 10:04 ctxlc
    -rwxrwxrwx   1 oracle   dba            0 Jul 12  2005 ctxlcO
    -rwxrwxrwx   1 oracle   dba       290224 Oct  9 10:04 ctxload
    -rwxrwxrwx   1 oracle   dba            0 Jul 12  2005 ctxloadO
    -rwxrwxrwx   1 oracle   dba        33112 Oct  9 10:05 cursize
    -rwxrwxrwx   1 oracle   dba            0 Jul 12  2005 cursizeO
    -rwxrwxrwx   1 oracle   dba         5403 Oct  9 10:05 dbca
    -rwxrwxrwx   1 oracle   dba        15472 Oct  9 10:05 dbfsize
    -rwxrwxrwx   1 oracle   dba            0 Jul 12  2005 dbfsizeO
    -rwxrwxrwx   1 oracle   dba         2428 Jan  1  2000 dbhome
    -rwxrwxrwx   1 oracle   dba         4654 Jan  1  2000 dbshut
    -rwxrwxrwx   1 oracle   dba        10415 Jan  1  2000 dbstart
    -rwxrwxrwx   1 oracle   dba         6396 Oct  9 10:02 dbua
    -rwxrwxrwx   1 oracle   dba       521272 Oct  9 10:05 dbv
    -rwxrwxrwx   1 oracle   dba            0 Aug 13  2005 dbvO
    -rwxrwxrwx   1 oracle   dba         1334 Oct  9 10:02 deploync
    -rwxrwxrwx   1 oracle   dba      2772112 Oct  9 10:05 dgmgrl
    -rwxrwxrwx   1 oracle   dba      2772112 Oct  9 10:04 dgmgrlO
    -rwxrwxrwx   1 oracle   dba          512 Oct  9 10:02 dropjava
    -rwxrwxrwx   1 oracle   dba       102384 Oct  9 10:05 dsml2ldif
    -rwxrwxrwx   1 oracle   dba       670056 Oct  9 10:05 dumpsga
    -rwxrwxrwx   1 oracle   dba            0 Jul 12  2005 dumpsga0
    -rwxrwxrwx   1 oracle   dba      2338948 Oct  9 10:05 e2eme
    -rwxrwxrwx   1 oracle   dba            0 Aug  7  2005 e2eme0
    -rwxrwxrwx   1 oracle   dba          153 Jun 13  2005 echodo
    -rwxrwxrwx   1 oracle   dba         8832 Oct  9 10:04 emagent
    -rwxrwxrwx   1 oracle   dba            0 Aug  7  2005 emagent0
    -rwxrwxrwx   1 oracle   dba         3774 Oct  9 10:05 emagentdeploy.pl
    -rwxrwxrwx   1 oracle   dba        43572 Oct  9 10:05 emagtm
    -rwxrwxrwx   1 oracle   dba        43568 Jun 29  2005 emagtm0
    -rwxrwxrwx   1 oracle   dba         1812 Oct  9 10:05 emca
    -rwxrwxrwx   1 oracle   dba        12419 Oct  9 10:05 emctl
    -rwxrwxrwx   1 oracle   dba        85908 Oct  9 10:05 emctl.pl
    -rwxrwxrwx   1 oracle   dba        12404 Jun  6  2005 emctl.template
    -rwxrwxrwx   1 oracle   dba       430004 Oct  9 10:04 emdctl
    -rwxrwxrwx   1 oracle   dba            0 Aug  7  2005 emdctl0
    -rwxrwxrwx   1 oracle   dba         1226 May 12  2005 emdfail.command
    -rwxrwxrwx   1 oracle   dba         3944 May 12  2005 emdlctl.template
    -rwxrwxrwx   1 oracle   dba         3449 May 12  2005 emdrollogs.pl
    -rwxrwxrwx   1 oracle   dba          767 May 12  2005 emlfail.command
    -rwxrwxrwx   1 oracle   dba         2802 May 12  2005 emrepdown.pl
    -rwxrwxrwx   1 oracle   dba         1693 May 12  2005 emrepdown.sh
    -rwxrwxrwx   1 oracle   dba          913 Oct  9 10:05 emtgtctl
    -rwxrwxrwx   1 oracle   dba        56944 Oct  9 10:05 emtgtctl2
    -rwxrwxrwx   1 oracle   dba            0 May 12  2005 emtgtctl20
    -rwxrwxrwx   1 oracle   dba         8814 Oct  9 10:05 emutil
    -rwxrwxrwx   1 oracle   dba        25232 May 12  2005 emwd
    -rwxrwxrwx   1 oracle   dba        51870 May 12  2005 emwd.pl
    -rwxrwxrwx   1 oracle   dba       793112 Oct  9 10:04 exp
    -rwxrwxrwx   1 oracle   dba            0 Jul 12  2005 expO
    -rwxrwxrwx   1 oracle   dba       215656 Oct  9 10:04 expdp
    -rwxrwxrwx   1 oracle   dba            0 Jul 12  2005 expdpO
    -r-sr-sr-x   1 nobody   dba        20352 Oct  9 10:05 extjob
    -rwxrwxrwx   1 oracle   dba        20320 Jul 12  2005 extjobO
    -rwxrwxrwx   1 oracle   dba        20352 Oct  9 10:05 extjobo
    -rwxrwxrwx   1 oracle   dba        20320 Jul 12  2005 extjoboO
    -rwxrwxrwx   1 oracle   dba        33184 Oct  9 10:05 extproc
    -rwxrwxrwx   1 oracle   dba        25992 Oct  9 10:05 extproc32
    -rwxrwxrwx   1 oracle   dba        25936 Jul 12  2005 extproc32O
    -rwxrwxrwx   1 oracle   dba            0 Aug 13  2005 extprocO
    -rwxrwxrwx   1 oracle   dba          339 Oct  9 10:02 extusrupgrade
    -rwxrwxrwx   1 oracle   dba      1153072 Jul 12  2005 fmputl
    -rwxrwxrwx   1 oracle   dba        15584 Jul 12  2005 fmputlhp
    -rwxrwxrwx   1 oracle   dba         5526 Jun  7  2005 genagtsh
    -rwxrwxrwx   1 oracle   dba         8356 Jun  7  2005 genclntsh
    -rwxrwxrwx   1 oracle   dba         4687 Jun  7  2005 genclntst
    -rwxrwxrwx   1 oracle   dba        33744 Oct  9 10:04 genezi
    -rwxrwxrwx   1 oracle   dba        33672 Aug 17  2005 geneziO
    -rwxrwxrwx   1 oracle   dba       500168 Jul  8  2005 genksms
    -rwxrwxrwx   1 oracle   dba         3751 Jul  8  2005 gennfgt
    -rwxrwxrwx   1 oracle   dba         5449 Jul  8  2005 gennttab
    -rwxrwxrwx   1 oracle   dba         3731 Jun  7  2005 genoccish
    -rwxrwxrwx   1 oracle   dba         8952 Jun  7  2005 genorasdksh
    -rwxrwxrwx   1 oracle   dba         2885 Jan  1  2000 gensyslib
    -rwxrwxrwx   1 oracle   dba            0 Aug 13  2005 grdcscan
    -rwxrwxrwx   1 oracle   dba      1399568 Jun 28  2005 gsd
    -rwxrwxrwx   1 oracle   dba         4548 Oct  9 10:02 gsd.sh
    -rwxrwxrwx   1 oracle   dba         4111 Oct  9 10:02 gsdctl
    -rwxrwxrwx   1 oracle   dba         2134 Feb 16  2003 helpins
    -rwxrwxrwx   1 oracle   dba       157680 Oct  9 10:05 hsalloci
    -rwxrwxrwx   1 oracle   dba            0 Aug 13  2005 hsallociO
    -rwxrwxrwx   1 oracle   dba        44528 Oct  9 10:05 hsdepxa
    -rwxrwxrwx   1 oracle   dba            0 Aug 13  2005 hsdepxaO
    -rwxrwxrwx   1 oracle   dba      1345140 Oct  9 10:05 hsodbc
    -rwxrwxrwx   1 oracle   dba            0 Aug 13  2005 hsodbcO
    -rwxrwxrwx   1 oracle   dba        44416 Oct  9 10:05 hsots
    -rwxrwxrwx   1 oracle   dba            0 Aug 13  2005 hsotsO
    -rwxrwxrwx   1 oracle   dba       401680 Oct  9 10:04 imp
    -rwxrwxrwx   1 oracle   dba            0 Jul 12  2005 impO
    -rwxrwxrwx   1 oracle   dba       220328 Oct  9 10:04 impdp
    -rwxrwxrwx   1 oracle   dba            0 Jul 12  2005 impdpO
    -rwxrwxrwx   1 oracle   dba         3271 Oct  9 10:02 isqlplusctl
    -rwxrwxrwx   1 oracle   dba        10904 Oct  9 10:02 isqlplusctl.pl
    -rwxrwxrwx   1 oracle   dba      9290872 Oct  9 10:05 kfod
    -rwxrwxrwx   1 oracle   dba            0 Jun 22  2005 kfod0
    -rwxrwxrwx   1 oracle   dba            0 Aug 13  2005 kfodO
    -rwxrwxrwx   1 oracle   dba       482352 Oct  9 10:05 kgmgr
    -rwxrwxrwx   1 oracle   dba       482352 Oct  9 10:04 kgmgrO
    -rwxrwxrwx   1 oracle   dba      3827080 Jul 12  2005 kgpmon
    lrwxrwxrwx   1 oracle   dba           57 Oct  9 10:02 lbuilder -> /oradata/oracle/product/10.2.0/Db_1/nls/lbuilder/lbuilder
      

  11.   

    一个用户只能够连续发三次,没办法我只好注册一个新号了,接到起上面:
    我按您说的,执行命令是这样子:
    $ ls -l $ORACLE_HOME/bin/oracle
    -rwxrwxrwx   1 oracle   dba      118498480 Oct  9 10:04 /oradata/oracle/product/10.2.0/Db_1/bin/oracle这个好像没有问题。
      

  12.   


    这个执行的结果像这样:
    $ su - oracle
    Password: 
    $ lsnrctl statusLSNRCTL for Solaris: Version 10.2.0.1.0 - Production on 07-MAR-2011 13:10:23Copyright (c) 1991, 2005, Oracle.  All rights reserved.Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
    STATUS of the LISTENER
    ------------------------
    Alias                     LISTENER
    Version                   TNSLSNR for Solaris: Version 10.2.0.1.0 - Production
    Start Date                03-MAR-2011 16:58:18
    Uptime                    3 days 20 hr. 12 min. 5 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Parameter File   /oradata/oracle/product/10.2.0/Db_1/network/admin/listener.ora
    Listener Log File         /oradata/oracle/product/10.2.0/Db_1/network/log/listener.log
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=unmsoem)(PORT=1521)))
    Services Summary...
    Service "PLSExtProc" has 1 instance(s).
      Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "mc" has 1 instance(s).
      Instance "mc", status READY, has 1 handler(s) for this service...
    Service "mcXDB" has 1 instance(s).
      Instance "mc", status READY, has 1 handler(s) for this service...
    Service "mc_XPT" has 1 instance(s).
      Instance "mc", status READY, has 1 handler(s) for this service...
    Service "u32" has 1 instance(s).
      Instance "u32", status READY, has 1 handler(s) for this service...
    Service "u32XDB" has 1 instance(s).
      Instance "u32", status READY, has 1 handler(s) for this service...
    Service "u32_XPT" has 1 instance(s).
      Instance "u32", status READY, has 1 handler(s) for this service...
    The command completed successfully不知道有什么异常没有?