How to resolve the issue of oracle port being already occupied?
If the Oracle listening port is already in use, you can try the following methods to resolve the issue:
- Find the process occupying a port: Use the following command to find the process occupying a specific port.
- Show me the connections and their process IDs associated with a specific port number using the netstat command.
- Find the PID of the port in use using a command.
- Terminate the process: Use the following command to terminate the process occupying the specified port.
- Terminate the process with the specified process ID forcefully.
- This will force the termination of the occupying process.
- Modify the listener configuration file: If the process occupying the port is an Oracle instance, you can try modifying the Oracle listener configuration file, listener.ora, to change the listener port to a different available port.
- Restart the listening service: After completing the above steps, restart the Oracle listening service.
- Stop the listener.
Start the listener. - This will restart the Oracle listener service and use the modified listener configuration file.
- Change the Oracle instance port: If the above method does not work, you can also try changing the listening port of the Oracle instance. The detailed steps are as follows:
- Connect to an Oracle database using SQL*Plus or SQL Developer.
- To view the current instance listening port, run the following command: SELECT dbms_xdb_config.gethttpsport() FROM dual;
- Execute the following command to change the instance listening port: EXEC dbms_xdb_config.sethttpsport(
); - Replace
with the new listening port number you want to use. - Check firewall settings: If your computer has a firewall enabled, make sure to allow Oracle listening ports to pass through the firewall. Verify firewall settings and ensure ports are not blocked.
If the above methods still cannot solve the problem, it is advisable to seek advice from Oracle support or seek professional IT technical support.