oracle怎么更换端口,【转】Oracle数据库修改端口

Oracle XE uses the embedded http listener that comes with the XML DB (XDB) to serve http requests. The default port for HTTP access is 8080.

It also supports the WebDAV protocol just as well as FTP.

You can determine the current configuration using the following commands when you connect to XE as the oracle user SYSTEM (or any other DBA):

C:/WINDOWS/system32>sqlplus system@xeSQL*Plus:

Release 10.1.0.2.0 - Production on Mi Jan 25 11:44:33 2006Copyright (c) 1982, 2004, Oracle.

All rights reserved.

Enter password:

Connected to:Oracle Database 10g Express Edition Release 10.2.0.1.0 - Beta

SQL> -- get current status

SQL> select dbms_xdb.gethttpport as

"HTTP-Port" ,

dbms_xdb.getftpport

as "FTP-Port" from dual;

HTTP-Port FTP-Port

---------- ----------

8080 0

You can change the http port and the ftp port to whatever you like (keep in mind that you need special privileges for ports < 1024 on Unix/Linux systems).

SQL> -- set http port and ftp port

SQL> begin

2 dbms_xdb.sethttpport('80');

3 dbms_xdb.setftpport('2100');

4 end;

5 /

PL/SQL procedure successfully completed.

SQL> select dbms_xdb.gethttpport

as

"HTTP-Port" , dbms_xdb.getftpport

as "FTP-Port" from dual;

HTTP-Port FTP-Port

---------- ----------

80 2100

If you only want to use the database without allowing access via http or ftp then you can disable both:

SQL> -- disable http and ftp access

SQL> begin

2 dbms_xdb.sethttpport('0');

3 dbms_xdb.setftpport('0');

4 end;

5 /

PL/SQL procedure successfully completed.

SQL> -- get current status

SQL> select dbms_xdb.gethttpport as

"HTTP-Port" ,

dbms_xdb.getftpport

as "FTP-Port"

from dual;

HTTP-Port FTP-Port

---------- ----------

0 0

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值