【轉】Oracle 學習筆記: Oracle10g監聽埠改變後DB Control無法使用的解決方法

spectre2發表於2011-03-25

修改前的listener.ora

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = D:\oracle\product)
      (PROGRAM = extproc)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = logicgate)(PORT = 1521))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
  )

 

修改後的listener.ora

 

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = D:\oracle\product)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = epcit)
      (ORACLE_HOME = d:\oracle\product)
      (SID_NAME = epcit)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = logicgate)(PORT = 1523))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
  )

 

監聽埠從1521變為1523。由於oracle例項的動態註冊只能在預設埠1521上執行,埠改變後我這裡使用了靜態註冊。重新啟動監聽器:

 

D:\>lsnrctl stop

D:\>lsnrctl start

D:\>lsnrctl services

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=logicgate)(PORT=1523)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0
         LOCAL SERVER
Service "epcit" has 1 instance(s).
  Instance "epcit", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
      "DEDICATED" established:0 refused:0
         LOCAL SERVER
The command completed successfully

 

可以看到資料庫例項"epcit"已經成功註冊到監聽器的埠1523上面。改變監聽器埠後執行tnsping會出錯,但只要更改tnsnames.ora中對應的埠就可以了。

 

然後登陸database control, 出現如下錯誤:Enterprise Manager is not able to connect to the database instance. The state of the components are listed below。修改方法如下:

 

1。%oracle_home\%hostname%_epcit\sysman\config\emoms.properties 在這個檔案裡我們可以找到兩個和埠有關的設定

oracle.sysman.eml.mntr.emdRepPort=1521

oracle.sysman.eml.mntr.emdRepConnectDescriptor=(DESCRIPTION\=(ADDRESS_LIST\=(ADDRESS\=(PROTOCOL\=TCP)(HOST\=LOGICGATE)(PORT\=1521)))(CONNECT_DATA\=(SERVICE_NAME\=epcit)))

把舊的埠改為新的埠就ok。

 

2。%oracle_home\%hostname%_epcit\sysman\emd\targets.xml  把所有舊的埠換成新的。

 

3。重啟database control,登陸oem,成功!

轉自:http://www.**.com/topic/322649 作者:logicgate 

作者 正文

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

相關文章