修改oracle xdb占用的8080端口

来源:百度文库 编辑:神马文学网 时间:2024/05/23 18:38:08
修改Oracle XDB占用的8080端口  Author: CopyFromWWW
Published: 2005/6/16
Read 29 times
Size 19.75 KB   

XML DB Port Assignments

by Jeff Hunter, Sr. Database Administrator

Contents

  1. Introduction
  2. Repository Views and Default Ports
  3. Changing XML DB Default Ports
  4. Disabling the Port Assignment


Introduction

Oracle introduced the XML Database in release 9i. Along with this new feature, Oracle continues the practice of incorporating new, barely documented port assignments that often leave the DBA to search endlessly for possible configuration file(s) that define these port assignments. Well, when it comes to searching for where these port numbers related to XML DB are defined, you will not find them on the file system, but rather inside the database. This article will attempt to unravel some of the mysteries on managing port assignments related to Oracle XML DB.

Repository Views and Default Ports

The key XML DB technologies can be grouped into two major classes - a XMLType that provides a native XML storage and retrieval capability strongly integrated with SQL, and a XML Repository that provides foldering, access control, versioning etc. for XML resources. Users view and manage XML objects like files and schemas in the XML Repository as a hierarchy of folders. This repository aspect of XML DB involves access through standard protocols such as HTTP/WebDAV and FTP. These servers will bind to ports 8080 and 2100 respectively by default.

DBA‘s will sometimes wonder why their Web Server, that always used to work, has all of the sudden been hijacked after installing Oracle9i and creating a database using DBCA. After some research, they attempt to shutdown the Oracle TNS listener and notice that the port in question (mostly 8080) is no longer being utilized. Unfortunately, there is little to tell the DBA that these ports are going to be used until they find out the hard way: When the database starts and steals the ports away from another process that hasn‘t yet started or when the other process errors and/or is unreachable.

Changing XML DB Default Ports

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                                      xml              text/xml                                      zip              application/x-zip-compressed                                                          en              english                                                                    gzip              zip file                                      tar              tar file                                      50        6000                    2111        local_listener        tcp        6000                    8081        local_listener        tcp        6000        XDB HTTP Server        16384        2000000000        Basic realm="XDB"                              index.html            index.htm                                                                        /Test                TestServlet                                            /oradb/*                DBURIServlet                                                                    TestServlet                Java                XDB Test Servlet                A servlet to test the internals of the XDB Servlet API                xdbtserv                xdb                                            DBURIServlet                DBURI                C                Servlet for accessing DBURIs                                  authenticatedUser                  authenticatedUser                                                                        

Disabling the Port Assignment

One of the easist ways to disable Oracle from assigning both XML DB ports (FTP and HTTP/WebDAV) is to remove the following instance parameter from the database:
    dispatchers=‘(PROTOCOL=TCP) (SERVICE=XDB)‘
This change would obviously require bouncing the database.

A second way to disable the XML DB ports is to simply change their port assignments to the value of zero (0). This is an attractive option since it uses code that can be incorporated directly into database creation scripts so that the value can be tweaked each time you create a new database.

Modifying these ports to zero can also be accomplished using a GUI; Oracle Enterprise Manager (version 9.2.0.1 or higher). Simply open OEM, select and expand the database. Next, expend the XML Database item and click on Configuration. You should be able to see and change any of the XML DB configuration parameters on the right-hand side of the OEM console. Simply make your changes and click APPLY to make them permanent.

For more information on Managing Oracle XML DB Using Oracle Enterprise Manager, click here.