23 March 2009

Change HTTP port on Oracle XE

If you use the free Oracle XE database and run into conflicts with the HTTP port 8080, you can switch it to another port following the steps outlined in this blog post; here are the steps:
  1. The default HTTP/FTP port for Oracle XE is 8080; however, port 8080 is often used by other apps (such as a local JBoss server instance). To change it, open up a SQL Plus session to your XE instance, then type the following to determine the port values:
    select dbms_xdb.gethttpport as "HTTP-Port"
    , dbms_xdb.getftpport as "FTP-Port" from dual;
  2. The results of the query are displayed:
    HTTP-Port   FTP-Port
    ---------- ----------
    8080 0
  3. If the port is indeed 8080 for HTTP, run this code to change it to 8090 and FTP to 2100:
    begin
    dbms_xdb.sethttpport('8090');
    dbms_xdb.setftpport('2100');
    end;

2 comments:

ruffp said...

Very good.
Just what I needed.
Thanks

Ronald said...

but when changed to some other port, say 2999, i could not browse the DB using the browser,

With this can only change the port, tell me how to make the XE to listen to the port 2999 service ??


Thanks
Ronald