修改前的listener.ora (D:oracleproduct10.2.0db_1NETWORKADMINlistener.ora)
SID_LIST_LISTENER =
LISTENER =
修改后的listener.ora
SID_LIST_LISTENER =
LISTENER =
监听端口从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).
Service "epcit" has 1 instance(s).
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%_epcitsysmanconfigemoms.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%_epcitsysmanemd argets.xml
3、重启database control,登陆oem,成功!
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/21969380/viewspace-1114823/ ,如需转载,请注明出处,否则将追究法律责任。