程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> Oracle數據庫 >> 關於Oracle數據庫 >> Oracle數據庫在一台機器配置兩個listener

Oracle數據庫在一台機器配置兩個listener

編輯:關於Oracle數據庫

  問題:一台機器同時裝兩套數據庫時(實例名o8161,o8151),無法同時啟動兩個listener,當啟動第二個listener時,顯示錯誤。

  $ lsnrctl start

  LSNRCTL for IBM/AIX RISC System/6000: Version 8.1.5.0.0 - Production on 14-SEP-00 09:25:17

  (c) Copyright 1998 Oracle Corporation. All rights reserved.

  TNS-01106: Listener using listener name LISTENER has already been started

  $ oerr tns 1106
  01106, 00000, "Listener using listener name %s has already been started"
  // *Cause: Another listener is already listening on one of the ADDRESSes
  // specified.
  // *Action: Shutdown the previous listener specified by the listener name
  // before starting this one.

  問題產生原因:
  兩個實例的LISTENER.ORA中IPC協議的KEY是相同,而一個系統中KEY必須是唯一的.

  解決辦法:
  修改key的值即可。修改後的文件信息:

  o8161實例:(沒有修改)

  # LISTENER.ORA Configuration File:/oracle/dbs/opstemp/szpcac1/network/admin/listener.ora
  # Generated by Oracle configuration tools.

  LISTENER =
  (DESCRIPTION_LIST =
  (DESCRIPTION =
  (ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
  )
  (ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = TCP)(HOST = loopback)(PORT = 1521))
  )
  )
  (DESCRIPTION =
  (PROTOCOL_STACK =
  (PRESENTATION = GIOP)
  (SESSION = RAW)
  )
  (ADDRESS = (PROTOCOL = TCP)(HOST = loopback)(PORT = 2481))
  )
  )

  SID_LIST_LISTENER =
  (SID_LIST =
  (SID_DESC =
  (SID_NAME = PLSExtProc)
  (ORACLE_HOME = /oracle)
  (PROGRAM = extproc)
  )
  (SID_DESC =
  (ORACLE_HOME = /oracle)
  (SID_NAME = o8161)
  )
  )

  08151實例:(經過修改)

  # LISTENER.ORA Configuration File:/ora815/network/admin/listener.ora
  # Generated by Oracle Net8 Assistant

  LISTENER =
  (DESCRIPTION_LIST =
  (DESCRIPTION =
  (ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = IPC)(KEY = TESTo815))
  )
  (ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = TCP)(HOST = loopback)(PORT = 1526))
  )
  )
  )

  SID_LIST_LISTENER =
  (SID_LIST =
  (SID_DESC =
  (SID_NAME = ora8151)
  (ORACLE_HOME = /ora815)
  (PROGRAM = extproc)
  )
  )

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved