Sunday, March 08, 2009

Reconfigure Oracle-XE to a different port for jdbc

I wanted to reconfigure my Oracle-XE instance to run the tnslsnr on port 1522 instead of 1521. So as first try I went in and just changed the listener.ora and tnsnames.ora files. But after those changes, the system did not give away a beep when I e.g. called lsnrctrl status.

Solution to this was (on RHEL 5.3):

# mv /etc/sysconfig/oracle-xe /tmp/
# /etc/init.d/oracle-xe configure

The script asked some questions about ports (you can look them up in the copy in /tmp) and the db password etc. And then started the database with the new port.


4 comments:

  1. thanks for this useful post. i finally was able to reconfigure oracle-xe on fedora.
    any idea what this will be on ubuntu? as oracle-xe doesnt sit in sysconfig .

    ReplyDelete
  2. I have no idea about ubuntu, but couldn't you search for it via

    $ find / -name oracle-xe

    ?

    ReplyDelete
  3. Hi,
    sorry forgot to reply back. i found it. it resides under /etc/defaults/
    so, the file path for ubuntu and its derivaties is
    /etc/defaults/oracle-xe

    ReplyDelete
  4. Ubuntu 10.10:

    /etc/default/oracle-xe

    ReplyDelete