更改oracle的监听端口

来源:互联网 发布:安徽财经大学网络 编辑:程序博客网 时间:2024/05/28 16:11

问题描述:Oracle和JBoss都装在一台机器上了,Oracle已经启动,当启动JBoss时报8080端口已占用,

在cmd中输入 netstat -ano 看到8080端口的进程PID,通过任务管理器得知是TNSLSNR.EXE进程(Oracle监听进程)

 

解决方法:将Oracle监听进程由8080改成8081

1、在oracle 安装文件夹下面搜索一下文件中含有8080 的文件,里面有个readme讲怎么改端口
2、登录sqlplus,输入下面命令

SQL> call dbms_xdb.cfg_update(updateXML(dbms_xdb.cfg_get(),
  2  '/xdbconfig/sysconfig/protocolconfig/httpconfig/http-port/text()',8081))
  3  /
SQL> commit;
SQL>  exec dbms_xdb.cfg_refresh;

 

附上打印内容:

C:/> sqlplus  /nolog
SQL*Plus: Release 9.2.0.4.0 - Production on Sat Aug 6 14:24:49 2005

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

SQL> connect  system 

Enter password:

Connected.
-- 把HTTP/WEBDAV端口从8080改到8081
SQL> call dbms_xdb.cfg_update(updateXML(dbms_xdb.cfg_get(),
  2  '/xdbconfig/sysconfig/protocolconfig/httpconfig/http-port/text()',8081))
  3  /

Call completed.
-- 把FTP端口从2100改到2111
SQL>  call dbms_xdb.cfg_update(updateXML(dbms_xdb.cfg_get(),
  2  '/xdbconfig/sysconfig/protocolconfig/ftpconfig/ftp-port/text()',2111))
  3  /

Call completed.

SQL> commit;

Commit complete.

SQL>  exec dbms_xdb.cfg_refresh;

PL/SQL procedure successfully completed.
-- 检查修改是否已经成功
SQL> select dbms_xdb.cfg_get from dual;

CFG_GET
--------------------------------------------------------------------------------
<xdbconfig xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd" xmlns:xsi="http://w

SQL> exit

原创粉丝点击