The following section describes the syntax that can be used to alter XML DB configuration information from within SQL*Plus. Ensure that you are logged into the database from a DBA account. In the following example, the default HTTP/WebDAV and FTP ports are changed from 8080 and 2100 to 8081 and 2111 respectively:
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;
CFG_GET
--------------------------------------------------------------------------------
900
32
,
300
100
3600
1048576
au
audio/basic
avi
video/x-msvideo
bin
application/octet-stream
bmp
image/bmp
doc
application/msword
eml
message/rfc822
gif
image/gif
htm
text/html
html
text/html
jpe
image/jpeg
jpeg
image/jpeg
jpg
image/jpeg
jsp
text/html
mid
audio/mid
mov
video/quicktime
movie
video/x-sgi-movie
mp3
audio/mpeg
mpe
video/mpg
mpeg
video/mpg
mpg
video/mpg
msa
application/x-msaccess
msw
application/x-msworks-wp
pcx
application/x-pc-paintbrush
pdf
application/pdf
ppt
application/vnd.ms-powerpoint
ps
application/postscript
qt
video/quicktime
ra
audio/x-realaudio
ram
audio/x-realaudio
rm
audio/x-realaudio
rtf
application/rtf
rv
video/x-realvideo
sgml
text/sgml
tif
image/tiff
tiff
image/tiff
txt
text/plain
url
text/plain
vrml
x-world/x-vrml
wav
audio/wav
wpd
application/wordperfect5.1
xls
application/vnd.ms-excel
【责编:admin】
--------------------next---------------------