Home > Database > Oracle > body text

How to check the oracle database port number

下次还敢
Release: 2024-04-18 20:57:15
Original
752 people have browsed it

You can obtain the Oracle database port number by querying the local_listener parameter in the V$PARAMETER table with SQLPlus. The steps include: access SQLPlus, connect to the database, execute the SQL query, and find the port number.

How to check the oracle database port number

How to check the Oracle database port number

Step 1: Access SQL*Plus

In a terminal or command prompt, type the following command to access SQL*Plus:

<code>sqlplus</code>
Copy after login

Step 2: Connect to the database

Connect using the following command To Oracle database:

<code>connect username/password</code>
Copy after login

Where:

  • username is your database username
  • password is your Database password

Step 3: Query the port number

Use the following SQL query to obtain the database port number:

<code>SELECT VALUE FROM V$PARAMETER WHERE NAME = 'local_listener'</code>
Copy after login

Steps 4: Find the port number

The query result will display the value of the local_listener parameter, which contains the port number. The following example shows the port number is 1521:

<code>VALUE
--------
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))</code>
Copy after login

The above is the detailed content of How to check the oracle database port number. 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