[转]通过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);

图片 1

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:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN”,

Edit listener.ora

Origin:

[plain] view
plain
copyprint?

  1. # listener.ora Network Configuration File: C:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.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:\app\Administrator\product\11.2.0\dbhome_1)  
  9.       (PROGRAM = extproc)  
  10.       (ENVS = “EXTPROC_DLLS=ONLY:C:\app\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.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:\app\Administrator  

    # listener.ora Network Configuration File: C:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora
    # Generated by Oracle configuration tools.

    SID_LIST_LISTENER =
    (SID_LIST =

    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = C:\app\Administrator\product\11.2.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:C:\app\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.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:\app\Administrator

 

 

After:

[plain] view
plain
copyprint?

  1. # listener.ora Network Configuration File: C:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.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:\app\Administrator\product\11.2.0\dbhome_1)  
  9.       (PROGRAM = extproc)  
  10.       (ENVS = “EXTPROC_DLLS=ONLY:C:\app\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll”)  
  11.     )  
  12.     (SID_DESC =  
  13.       (SID_NAME = ORCL)  
  14.       (ORACLE_HOME =C:\app\Administrator\product\11.2.0\dbhome_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:\app\Administrator  

    # listener.ora Network Configuration File: C:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora
    # Generated by Oracle configuration tools.

    SID_LIST_LISTENER =
    (SID_LIST =

    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = C:\app\Administrator\product\11.2.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:C:\app\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )
    (SID_DESC =
      (SID_NAME = ORCL)
      (ORACLE_HOME =C:\app\Administrator\product\11.2.0\dbhome_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:\app\Administrator

 

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 1一G 难点小记 : 
http://denger.iteye.com/blog/770732

 

相关文章