Home  >  Article  >  Database  >  How to read oracle port number

How to read oracle port number

下次还敢
下次还敢Original
2024-04-18 20:06:12606browse

The Oracle port number can be viewed by using the command line window to enter "netstat -aon | findstr LISTENING | grep oracle"; using the Oracle Listener Control utility "lsnrctl status".

How to read oracle port number

How to check the Oracle port number

Direct viewing method:

  • Use the command line window (CMD or Terminal)
  • Enter the following command:
<code>netstat -aon | findstr LISTENING | grep oracle  </code>

View the result:

Command output All ports that are listening will be displayed, the port containing the "oracle" string is the Oracle port.

Alternative:

Use the Oracle Listener Control Utility (lsnrctl):

  • Open the command line window.
  • Enter the Oracle listener directory, for example:
<code>cd /u01/app/oracle/product/12.2.0/dbhome_1/bin  </code>
  • Enter the following command:
<code>lsnrctl status  </code>

View the results:

The command output will show the status of all listeners, including their port numbers.

Supplementary Note:

  • By default, Oracle database uses port 1521.
  • Oracle RAC database uses ports 1521 and 1522.
  • If a port matching "oracle" is not found, you may need to check whether the Oracle service is not configured correctly or is not started.

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

Statement:
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