Oracle database can query the port through the following methods: use the netstat command (such as netstat -an | grep oracle) to find the listening port; use Oracle SQL to query the V$LISTENER view (such as SELECT * FROM V$LISTENER); use Oracle Enterprise Manager View the "Listener Port" value in the "Connections" section. The default port for Oracle database is 1521, but this can be changed if necessary.
Oracle database port query method
To query the Oracle database port, you can use the following method:
1. Use the command line
<code>netstat -an | grep oracle</code>
<code>tcp 0 0 0.0.0.0:1521 0.0.0.0:* LISTEN</code>
1521
is the default port of the Oracle database. 2. Use Oracle SQL query
<code>SELECT * FROM V$LISTENER;</code>
<code>HOST PORT ---------------- ---------- MYHOSTNAME 1521</code>
3. Use Oracle Enterprise Manager (OEM)
Tip:
listener.ora
file and it will take effect after the database is restarted. netstat
command, for example, use netstat -a -o
on Windows. The above is the detailed content of How to query the oracle database port. For more information, please follow other related articles on the PHP Chinese website!