oracle11g本地能夠訪問但局域網沒法訪問

  問題描述,如今有兩臺電腦 A 和 B :html

  1)電腦 A 上有 Oracle11G服務端; ip地址 192.168.1.198; 端口1521;數據庫

  2)電腦 A 本機鏈接數據庫正常,能夠登陸及操做等;windows

  3)電腦B配置訪問電腦A時報錯:ORA-12541:TNS:無監聽程序oracle

  報這種錯的話,網上有說法,說是防火牆沒關,或者是服務端服務沒啓好等,按本人的實際狀況解說:由於oracle服務端訪問配置是須要配置訪問地址監聽的,具體見Oracle安裝路徑:% product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora,這個是個人oracle監聽服務的配置文件,內容以下:app

# listener.ora Network Configuration File: E:\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 = E:\app\Administrator\product\11.2.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:E:\app\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.190)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = E:\app\Administrator
View Code

  這時候我能夠採用兩種方法來解決:ide

  方法一:直接用下面的語句覆蓋掉listener.ora中的內容,以後重啓oracle和監聽器便可。工具

# listener.ora Network Configuration File: E:\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 = E:\app\Administrator\product\11.2.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:E:\app\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = SKY-20130705VGC)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = E:\app\Administrator
View Code

  方法二:用windows下的oracle的監聽配置工具,把監聽從新配置一次,以後重啓oracle和監聽器便可。從新配置監聽器的方法以下:spa

 

參考資料:.net

http://www.dedecms.com/knowledge/data-base/oracle/2012/1214/17634.html3d

http://blog.csdn.net/wwbmyos/article/details/11475551

相關文章
相關標籤/搜索