Oracle XDB與各種App Server默認(rèn)端口沖突問題的解決
XDB為Oracle數(shù)據(jù)庫(kù)提供了一個(gè)操作XML Object對(duì)象的XDB Server Service,包括XML結(jié)構(gòu)管理,XML 訪問控制管理等功能。但是真正令XDB比較為人熟悉的,反而是XDB Server Service,因?yàn)樗?strong>默認(rèn)端口設(shè)置是8080,和各種application Server是沖突的(多數(shù)app server的http端口都是8080) 改XDB SERVER的默認(rèn)端口即可,不幸的是,同多數(shù)軟件不同,ORACLE的很多配置不是存儲(chǔ)在plain text格式的配置文件里,而是存儲(chǔ)在數(shù)據(jù)庫(kù)里(/sys/xdbconfig.xml).這就需要通過數(shù)據(jù)庫(kù)操作來(lái)修改配置。
解決方法:
1. 以sysdba身份進(jìn)行登陸。
2.執(zhí)行dbms_xdb.cfg_update()方法 SQL> call dbms_xdb.cfg_update(updateXML(dbms_xdb.cfg_get(),'/xdbconfig/sysconfig/protocolconfig/httpconfig/http-port/text()', 9090)); Call completed.
3.SQL> commit; Commit complete. 此句其實(shí)無(wú)甚必要,因?yàn)閐bms_xdb.cfg_update是auto-commit的。
4. SQL> EXEC dbms_xdb.cfg_refresh; PL/SQL procedure successfully completed.
0 - Production
With the Partitioning, OLAP and Data Mining options 此句也無(wú)甚必要,此句使當(dāng)前更改立即在本session生效.即使不加此句,你重新sqlplus登錄一下(等于重開一個(gè)oracle session),也能看到oracle的更改效果。
oracle很多配置都是"熱更改"(runtime config),更改后,在其他新開的session就會(huì)獲得更改效果。
5.看結(jié)果:
這里看的實(shí)際就是一個(gè)XMLType字段:
- SQL> SELECT dbms_xdb.cfg_get FROM dual; CFG_GET
- <xdbconfig xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd" xmlns:xsi="http://w -只顯示這么點(diǎn),要重新設(shè)一下行模式頁(yè)模式
- SQL> set long 100
- SQL> set pagesize 100 SQL> SELECT dbms_xdb.cfg_get FROM dual; CFG_GET
- <xdbconfig xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd"
- xmlns:xsi="http://w
- ww.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/x
- db/xdbconfig.xsd
- http://xmlns.oracle.com/xdb
- /xdbconfig.xsd">
- <sysconfig>
- <protocolconfig>
- <ftpconfig>
- <ftp-port>0</ftp-port>
- <ftp-listener>local_listener</ftp-listener>
- <ftp-protocol>tcp</ftp-protocol>
- <logfile-path/>
- <log-level>0</log-level>
- <session-timeout>6000</session-timeout>
- <buffer-size>8192</buffer-size>
- </ftpconfig>
- <httpconfig>
- <http-port>9090</http-port>
- <http-listener>local_listener</http-listener>
- <http-protocol>tcp</http-protocol>
- <max-http-headers>64</max-http-headers>
- <max-header-size>16384</max-header-size>
- <max-request-body>2000000000</max-request-body>
- <session-timeout>6000</session-timeout>
- <server-name>XDB HTTP Server</server-name>
- </protocolconfig>
- <xdbcore-xobmem-bound>1024</xdbcore-xobmem-bound>
- <xdbcore-loadableunit-size>16</xdbcore-loadableunit-size>
- </sysconfig>
- </xdbconfig>
關(guān)于Oracle數(shù)據(jù)庫(kù)的XDB與APP Server的默認(rèn)端口的沖突問題的解決就介紹到這里,希望本次的介紹能夠給您帶來(lái)一些收獲,謝謝!
【編輯推薦】


2009-11-09 09:06:44




