Oracle 默认的XML DB把HTTP的默认端口设为8080,这是一个太常用的端口了,很多别的WebServer都会使用这个端口,所以我们需要修改它。方法三种:
1。dbca,选择你的数据库,然后Standard Database Features->Customize->Oracle XML DB option,进入这个画面你应该就知道怎么改了。
2。OEM console,在XML Database 的配置里面修改
3。用oracle提供的包:
-- 把HTTP/WEBDAV端口从8080改到8081
SQL> call dbms_xdb.cfg_update(updateXML(dbms_xdb.cfg_get(),
'/xdbconfig/sysconfig/protocolconfig/httpconfig/http-port/text()',8081))
/
-- 把FTP端口从2100改到2111
SQL> call dbms_xdb.cfg_update(updateXML(dbms_xdb.cfg_get(),
'/xdbconfig/sysconfig/protocolconfig/ftpconfig/ftp-port/text()',2111))
/
SQL> commit;
SQL> exec dbms_xdb.cfg_refresh;
-- 检查修改是否已经成功
SQL> set long 100000
SQL> set pagesize 1000
SQL> select dbms_xdb.cfg_get from dual;
以下是我使用的方法
SQL> -- Change the HTTP/WEBDAV port from 8080 to 8081
SQL> call dbms_xdb.cfg_update(updateXML(
2 dbms_xdb.cfg_get()
3 , '/xdbconfig/sysconfig/protocolconfig/httpconfig/http-port/text()'
4 , 8081))
5 /
Call completed.
SQL> -- Change the FTP port from 2100 to 2111
SQL> call dbms_xdb.cfg_update(updateXML(
2 dbms_xdb.cfg_get()
3 , '/xdbconfig/sysconfig/protocolconfig/ftpconfig/ftp-port/text()'
4 , 2111))
5 /
Call completed.
SQL> COMMIT;
Commit complete.
SQL> EXEC dbms_xdb.cfg_refresh;
PL/SQL procedure successfully completed.
SQL> -- Verify the change
SQL> set long 100000
SQL> set pagesize 9000
SQL> SELECT dbms_xdb.cfg_get FROM dual;