各位达人, 我物理机是 WinXP, 32位, 虚拟机是 Redhat 5, 32位。 在虚拟机上安装了Oracle 11g,32位的。 现在已经可以正常登录Oracle,但是连接测试就是通不过。请问是什么原因? 非常感谢! ORA-01034: ORACLE not available
 ORA-27101: shared memory realm does not exist
 Linux Error: 2: No such file or directory
 我的tnsnames.ora, listener.ora,sqlnet.ora 如下: tnsnames.ora # tnsnames.ora Network Configuration File: /ora/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
 # Generated by Oracle configuration tools. ORCL =
   (DESCRIPTION =
     (ADDRESS_LIST =
       (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.3)(PORT = 1521))
     )
     (CONNECT_DATA =
       (SERVICE_NAME = orcl)
     )
   )
 listener.ora # listener.ora Network Configuration File: /ora/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
 # Generated by Oracle configuration tools. SID_LIST_LISTENER =
   (SID_LIST =
     (SID_DESC =
       (GLOBAL_DBNAME = orcl)
       (ORACLE_HOME = /ora/app/oracle/product/11.2.0/dbhome_1)
       (SID_NAME = orcl)
     )
   ) LISTENER =
   (DESCRIPTION_LIST =
     (DESCRIPTION =
       (ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
     )
   ) ADR_BASE_LISTENER = /ora/app/oracle
 sqlnet.ora # sqlnet.ora Network Configuration File: /ora/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora
 # Generated by Oracle configuration tools. NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT) SQLNET.AUTHENTICATION_SERVICES=(NONE) ADR_BASE = /ora/app/oracle

解决方案 »

  1.   

    启动了的。我从 Oracle 客户端都能登录的。
      

  2.   

    SQL> select INSTANCE_NAME from v$instance;INSTANCE_NAME
    ----------------
    orcl
    这是我启动的实例。
      

  3.   

    启动了的。我从 Oracle 客户端都能登录的。
    ====================================
    连接测试是怎么进行的?
      

  4.   

    netmgr -> command -> Test Service
      

  5.   

    是不是你的测试上面连接没有配置正确?  
    看你那个错误,的确有点像没有找到服务,或者服务已经关闭。
    netmgr 没用过, 你可以用 net configration assistant 里面配置连接测试一下。  注意一下 端口可实例名。
      

  6.   

    虚拟机和宿主机器应该设置在同一IP段。
    如果使用的是VMWare虚拟机,Network Adapter设置要选择Bridged:Connect directly to the physical network.这样才可以.
      

  7.   

    LuiseRADL 您好!我的虚拟机现在就是这样设置的,用到是 Bridged:Connect directly to the physical network.虚拟机IP地址是 192.168.1.3.宿主机的IP地址是 192.168.1.4.我现在能在宿主机上通过Oracle客户端访问 虚拟机上 Oracle数据库。在虚拟机上的 Test Service却没有通过。这让我不得其解。
      

  8.   

    是不是你的宿主机上有多个ORACLE_HOME目录?
      

  9.   


    [oracle@localhost ~]$ echo $ORACLE_HOME
    /ora/app/oracle/product/11.2.0/dbhome_1/
    只有一个哎
      

  10.   

    你在1楼贴的有个报错:
    Linux Error: 2: No such file or directory
    检查一下alert日志文件
      

  11.   


    askandstudy 您好!我的 init.ora是# 
    # $Header: rdbms/admin/init.ora /main/23 2009/05/15 13:35:38 ysarig Exp $ 

    # Copyright (c) 1991, 1997, 1998 by Oracle Corporation
    # NAME
    #   init.ora
    # FUNCTION
    # NOTES
    # MODIFIED
    #     ysarig     05/14/09  - Updating compatible to 11.2
    #     ysarig     08/13/07  - Fixing the sample for 11g
    #     atsukerm   08/06/98 -  fix for 8.1.
    #     hpiao      06/05/97 -  fix for 803
    #     glavash    05/12/97 -  add oracle_trace_enable comment
    #     hpiao      04/22/97 -  remove ifile=, events=, etc.
    #     alingelb   09/19/94 -  remove vms-specific stuff
    #     dpawson    07/07/93 -  add more comments regarded archive start
    #     maporter   10/29/92 -  Add vms_sga_use_gblpagfile=TRUE 
    #     jloaiza    03/07/92 -  change ALPHA to BETA 
    #     danderso   02/26/92 -  change db_block_cache_protect to _db_block_cache_p
    #     ghallmar   02/03/92 -  db_directory -> db_domain 
    #     maporter   01/12/92 -  merge changes from branch 1.8.308.1 
    #     maporter   12/21/91 -  bug 76493: Add control_files parameter 
    #     wbridge    12/03/91 -  use of %c in archive format is discouraged 
    #     ghallmar   12/02/91 -  add global_names=true, db_directory=us.acme.com 
    #     thayes     11/27/91 -  Change default for cache_clone 
    #     jloaiza    08/13/91 -         merge changes from branch 1.7.100.1 
    #     jloaiza    07/31/91 -         add debug stuff 
    #     rlim       04/29/91 -         removal of char_is_varchar2 
    #   Bridge     03/12/91 - log_allocation no longer exists
    #   Wijaya     02/05/91 - remove obsolete parameters
    #
    ##############################################################################
    # Example INIT.ORA file
    #
    # This file is provided by Oracle Corporation to help you start by providing
    # a starting point to customize your RDBMS installation for your site. 

    # NOTE: The values that are used in this file are only intended to be used
    # as a starting point. You may want to adjust/tune those values to your
    # specific hardware and needs. You may also consider using Database
    # Configuration Assistant tool (DBCA) to create INIT file and to size your
    # initial set of tablespaces based on the user input.
    ################################################################################ Change '<ORACLE_BASE>' to point to the oracle base (the one you specify at
    # install time)db_name='ORCL'
    memory_target=1G
    processes = 150
    audit_file_dest='<ORACLE_BASE>/admin/orcl/adump'
    audit_trail ='db'
    db_block_size=8192
    db_domain=''
    db_recovery_file_dest='<ORACLE_BASE>/flash_recovery_area'
    db_recovery_file_dest_size=2G
    diagnostic_dest='<ORACLE_BASE>'
    dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'
    open_cursors=300 
    remote_login_passwordfile='EXCLUSIVE'
    undo_tablespace='UNDOTBS1'
    # You may want to ensure that control files are created on separate physical
    # devices
    control_files = (ora_control1, ora_control2)
    compatible ='11.2.0'
    里面没有 background_dump_dest参数的设置...
      

  12.   

    askandstudy 您好!是不是自己在 init.ora 里加上 background_dump_dest='<ORACLE_BASE>/admin/<ORACLE_SID>/bdump'然后重新启动数据库就好了?
      

  13.   

    可以参考一下这篇博文,虽然操作系统有区别,但我想会有一些启示。
    http://blog.csdn.net/luiseradl/article/details/7085222
      

  14.   


    哦,好的,LuiseRADL,非常感谢!
      

  15.   

    11g好像是diagnostic_dest='<ORACLE_BASE>'这里吧或者在$ORACLE_HOME/log里或者你在目录下搜索一下alter*文件
      

  16.   


    非常感谢askandstudy!我看了一下我的 netmgr 里的 Service Naming 下的 orcl 的配置,Service Name 写的是 orcl.而Listener的 Host是 localhost.localdomain.然后我把 Service Name 改写为 orcl.localdomain,然后就测试通过了...