zoukankan      html  css  js  c++  java
  • [转]通过Net Manager 配置Oracle 11g本地监听服务(listener service)

    本文转自:http://blog.csdn.net/mozart_cai/article/details/8596504

    [Target]

    通过ip address 监听orcl服务,而不是通过localhost

    [Prerequisite]

    Windows Server 2003 32bit with Oracle 11g installed

    [Steps]

    1. Open Oracle Net Manager
    Start->All Programs->Oracle-OraDb11g_home1->Configuration and Migration Tools->Net Manager;
     
    2. Add a listener
    In Oracle Net Manager window, choose listeners, click Add Address(pic Oracle Net Manager);
    Host: ip address of the machine installed oracle
    Port: 1521
    Click "Close Button";
    Click "Save";
     
    3.Restart oracle listener service
    Start->Command Prompt;
    Type "lsnrctl";
    Type "status";
    Type "stop";
    Type "start";
    Type "status";
    We find that listener service for database orcl is not running, so we edit listener.ora to make a workaround.
     
    4.Edit listener.ora (seems like a workaround)
    In directory "C:appAdministratorproduct11.2.0dbhome_1NETWORKADMIN",
    Edit listener.ora
    Origin:
    1. # listener.ora Network Configuration File: C:appAdministratorproduct11.2.0dbhome_1NETWORKADMINlistener.ora  
    2. # Generated by Oracle configuration tools.  
    3.   
    4. SID_LIST_LISTENER =  
    5.   (SID_LIST =  
    6.     (SID_DESC =  
    7.       (SID_NAME = CLRExtProc)  
    8.       (ORACLE_HOME = C:appAdministratorproduct11.2.0dbhome_1)  
    9.       (PROGRAM = extproc)  
    10.       (ENVS = "EXTPROC_DLLS=ONLY:C:appAdministratorproduct11.2.0dbhome_1inoraclr11.dll")  
    11.     )  
    12.   )  
    13.   
    14. LISTENER =  
    15.   (DESCRIPTION_LIST =  
    16.     (DESCRIPTION =  
    17.       (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))  
    18.     )  
    19.     (DESCRIPTION =  
    20.       (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))  
    21.     )  
    22.     (DESCRIPTION =  
    23.       (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.3.4)(PORT = 1521))  
    24.     )  
    25.   )  
    26.   
    27. ADR_BASE_LISTENER = C:appAdministrator  
    # listener.ora Network Configuration File: C:appAdministratorproduct11.2.0dbhome_1NETWORKADMINlistener.ora
    # Generated by Oracle configuration tools.
    
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = CLRExtProc)
          (ORACLE_HOME = C:appAdministratorproduct11.2.0dbhome_1)
          (PROGRAM = extproc)
          (ENVS = "EXTPROC_DLLS=ONLY:C:appAdministratorproduct11.2.0dbhome_1inoraclr11.dll")
        )
      )
    
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
        )
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
        )
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.3.4)(PORT = 1521))
        )
      )
    
    ADR_BASE_LISTENER = C:appAdministrator
    
     
     
    After:
    1. # listener.ora Network Configuration File: C:appAdministratorproduct11.2.0dbhome_1NETWORKADMINlistener.ora  
    2. # Generated by Oracle configuration tools.  
    3.   
    4. SID_LIST_LISTENER =  
    5.   (SID_LIST =  
    6.     (SID_DESC =  
    7.       (SID_NAME = CLRExtProc)  
    8.       (ORACLE_HOME = C:appAdministratorproduct11.2.0dbhome_1)  
    9.       (PROGRAM = extproc)  
    10.       (ENVS = "EXTPROC_DLLS=ONLY:C:appAdministratorproduct11.2.0dbhome_1inoraclr11.dll")  
    11.     )  
    12.     (SID_DESC =  
    13.       (SID_NAME = ORCL)  
    14.       (ORACLE_HOME =C:appAdministratorproduct11.2.0dbhome_1)  
    15.       (GLOBAL_DBNAME = ORCL)  
    16.     )  
    17.   )  
    18.   
    19. LISTENER =  
    20.   (DESCRIPTION_LIST =  
    21.     (DESCRIPTION =  
    22.       (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))  
    23.     )  
    24.     (DESCRIPTION =  
    25.       (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))  
    26.     )  
    27.     (DESCRIPTION =  
    28.       (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.3.4)(PORT = 1521))  
    29.     )  
    30.   )  
    31.   
    32. ADR_BASE_LISTENER = C:appAdministrator  
    # listener.ora Network Configuration File: C:appAdministratorproduct11.2.0dbhome_1NETWORKADMINlistener.ora
    # Generated by Oracle configuration tools.
    
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = CLRExtProc)
          (ORACLE_HOME = C:appAdministratorproduct11.2.0dbhome_1)
          (PROGRAM = extproc)
          (ENVS = "EXTPROC_DLLS=ONLY:C:appAdministratorproduct11.2.0dbhome_1inoraclr11.dll")
        )
        (SID_DESC =
          (SID_NAME = ORCL)
          (ORACLE_HOME =C:appAdministratorproduct11.2.0dbhome_1)
          (GLOBAL_DBNAME = ORCL)
        )
      )
    
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
        )
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
        )
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.3.4)(PORT = 1521))
        )
      )
    
    ADR_BASE_LISTENER = C:appAdministrator
    
     
    In DOS type "lsnrtcl";
    Type "status";
    See changes.
    Type "stop";
    Type "start";
    Type "status";
    We find that listener service for orcl is running.
     
    Done.
     
    [Reference] [1]Oracle中"listener does not currently know of SID given in connect descriptor" :  http://blog.csdn.net/mozart_cai/article/details/8596526
    [2]ORA-12505,TNS:listener does not currently know of SID given in connect descriptor :  http://blog.csdn.net/wl_ldy/article/details/8012992
    [3]Oracle the network adapter could not establish the connection :  http://www.cnblogs.com/adolfmc/archive/2012/10/07/2713711.html
    [4]JDBC 连接 Oracle 11G 问题小记 :  http://denger.iteye.com/blog/770732
  • 相关阅读:
    H5定位终极解决方案
    软帝学院教你使用cookie法,查看最近看过的书
    你真的会用Gson吗?Gson使用指南(一)
    Java程序员应当知道的10个面向对象设计原则
    java获取当前月第一天和最后一天,上个月第一天和最后一天
    正则基础教程一些冷门的知识
    爆笑的程序员梗,笑死人不偿命!
    java字符串操作扩充:灵活截取字符串
    如何分析及处理 Flink 反压?
    与君初相识,犹如故人归
  • 原文地址:https://www.cnblogs.com/freeliver54/p/3645671.html
Copyright © 2011-2022 走看看