Home > Database > Oracle > body text

How to change the oracle database port

下次还敢
Release: 2024-04-18 21:03:17
Original
916 people have browsed it

Oracle database port modification guide: Stop the database service; modify the value of PORT in the listener configuration; modify the value of ORACLE_PORT in the database configuration; restart the listener and database; use the netstat command to verify that the port has been changed.

How to change the oracle database port

Oracle Database Port Modification Guide

Question: How to modify the Oracle database port?

Answer:

The steps to modify the Oracle database port are as follows:

Step 1: Stop the database service

<code>systemctl stop oracle-xe</code>
Copy after login

Step 2: Modify the listener configuration

Modify the listener configuration located at /etc/oracle/listener.ora. Find the following line:

<code>LISTENER =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521))
  )</code>
Copy after login

Change PORT=1521 to your desired port number.

Step 3: Modify the database configuration

Modify the database configuration located at /etc/sysconfig/oracle-xe. Find the following line:

<code>ORACLE_PORT=1521</code>
Copy after login

Change <code>ORACLE_PORT=1521</code> to the same port number set in step 2.

Step 4: Restart listeners and database

<code>systemctl start oracle-xe-listener
systemctl start oracle-xe</code>
Copy after login

Step 5: Verify changes

Use netstat Command to verify that the port has been changed:

<code>netstat -nlpt | grep oracle</code>
Copy after login

The output should show the new port.

The above is the detailed content of How to change the oracle database port. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template