oracle 雙監聽器啟動時報tns-01106錯誤

paulyibinyi發表於2009-10-26

環境:

在一臺主機上有兩個oracle使用者,每個使用者裝有一個資料庫例項,分別有各自的監聽名
在啟動一個監聽後,然後再啟動另外一個監聽時報TNS-01106錯誤

admin]$lsnrctl start listener2

LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.2.0 - Production on 04-JUN-2008 11:08:59

Copyright (c) 1991, 2005, Oracle. All rights reserved.

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

每個使用者的listener.ora配置如下:

SID_LIST_gzthgk =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /ora_tygk/app/product/10.2.0/db_1)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = gzthgk)
      (ORACLE_HOME = /ora_tygk/app/product/10.2.0/db_1)
      (SID_NAME = gzthgk)
    )
  )

gzthgk =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.160.8.35)(PORT = 1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
  )

 

SID_LIST_nstrong=
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /ora_ywgl/app/product/10.2.0/db_1)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = nstrong)
      (ORACLE_HOME = /ora_ywgl/app/product/10.2.0/db_1)
      (SID_NAME = nstrong)
    )
  )


nstrong =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.160.8.51)(PORT = 1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
  )


主要原因nstrong和gzthgk的key為EXTPROC0相同導致,所以有一個啟動了,會導致另外一個啟動不了
解決方法:把其中一個listener的key=EXTPROC0改為key=EXTPROC1,或者去掉這一行
         (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))

兩個監聽啟動都正常。

 

 


 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7199859/viewspace-617443/,如需轉載,請註明出處,否則將追究法律責任。

相關文章