BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

修改前的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,成功!



已有 0 人发表留言,猛击->>这里<<-参与讨论


JavaEye推荐