Oracle 資料庫連接埠號碼查詢方法
步驟1:使用Oracle 監聽器
<code>lsnrctl status</code>
步驟 2:使用 SQL 查詢
<code>SELECT value FROM v$parameter WHERE name = 'local_listener'</code>
步驟3:從監聽器名稱取得連接埠號碼
<code>lsnrctl status <监听器名称></code>
範例
如果監聽器名為LISTENER,則查詢指令為:
<code>lsnrctl status LISTENER</code>
輸出類似:
<code>Status of the LISTENER listener -------------------------------- Version 12.1.0.2.0 Start Date 13-MAY-19 Uptime 0 days 16 hours 47 minutes 04 seconds Trace Level off Security ON: Local OS Authentication SNMP OFF Default Service orcl Services Summary... Service "orcl" has 1 instance(s). Instance "orcl", status READY, has 1 handler(s) for this service... Handler(s): "DEDICATED" established:10035927 received:14858731401 connect time:2934511431842 sent:0 bytes Protocol Address Connect Data TCP (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<HOSTNAME>)(PORT=1521)))</code>
在這個範例中,Oracle 資料庫的連接埠號碼為1521。
以上是oracle資料庫連接埠號碼怎麼查的詳細內容。更多資訊請關注PHP中文網其他相關文章!