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.
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>
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>
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>
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>
Step 5: Verify changes
Use netstat
Command to verify that the port has been changed:
<code>netstat -nlpt | grep oracle</code>
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!