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;