溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

oracle單實(shí)例如何監(jiān)聽修改端口

發(fā)布時(shí)間:2021-11-09 11:11:01 來源:億速云 閱讀:233 作者:小新 欄目:關(guān)系型數(shù)據(jù)庫(kù)

小編給大家分享一下oracle單實(shí)例如何監(jiān)聽修改端口,相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!

Oracle 單一主機(jī)多個(gè)實(shí)例多個(gè)監(jiān)聽器配置要點(diǎn)  
 1. 一臺(tái)服務(wù)器主機(jī), 有多個(gè)實(shí)例, 如: TSDB/ORCL; 又需要配置多個(gè)監(jiān)聽器
 2. 需要指定不同的LISTENER端口  
 3.pmon只會(huì)動(dòng)態(tài)注冊(cè)port等于1521的監(jiān)聽器, 其它端口則pmon不能動(dòng)態(tài)注冊(cè)listener, 要想讓pmon動(dòng)態(tài)注冊(cè)listener, 需要設(shè)置local_listener參數(shù) 

[oracle@12c01 admin]$ cat listener.ora 

ANDYCDB =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 12c01)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

ANDYCDB_TEST =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 12c01)(PORT = 1522))
    )
  )

[oracle@12c01 admin]$ cat tnsnames.ora 
# tnsnames.ora Network Configuration File: /home/oracle/app/oracle/product/12.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

ANDYCDB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 12c01)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = andycdb)
    )
  )


LISTENER_ANDYCDB =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 12c01)(PORT = 1521))

PDB01 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 12c01)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = pdb01)
    )
  )

LISTENER_PDB01 =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 12c01)(PORT = 1521)

LISTENER_TEST =  
(DESCRIPTION =  
(ADDRESS = (PROTOCOL = TCP)(HOST = 12c01)(PORT = 1522))  


#################
lsnrctl操作:
LSNRCTL>  set current_listener ANDYCDB_TEST
Current Listener is ANDYCDB_TEST

LSNRCTL> start
Starting /home/oracle/app/oracle/product/12.2.0/dbhome_1/bin/tnslsnr: please wait...


TNSLSNR for Linux: Version 12.2.0.1.0 - Production
System parameter file is /home/oracle/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /home/oracle/app/oracle/diag/tnslsnr/12c01/andycdb_test/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=12c01)(PORT=1522)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=12c01)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias                     ANDYCDB_TEST
Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date                10-APR-2018 21:59:17
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/oracle/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /home/oracle/app/oracle/diag/tnslsnr/12c01/andycdb_test/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=12c01)(PORT=1522)))
The listener supports no services

The command completed successfully

LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=12c01)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias                     ANDYCDB_TEST
Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date                10-APR-2018 21:59:17
Uptime                    0 days 0 hr. 1 min. 26 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/oracle/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /home/oracle/app/oracle/diag/tnslsnr/12c01/andycdb_test/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=12c01)(PORT=1522)))
The listener supports no services
The command completed successfully

-- 設(shè)置一個(gè)監(jiān)聽端口
SQL> alter system set local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST = 12c01)(PORT = 1522))';
System altered.

[oracle@12c01 admin]$ lsnrctl status andycdb_test

LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 10-APR-2018 22:38:32

Copyright (c) 1991, 2016, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=12c01)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias                     ANDYCDB_TEST
Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date                10-APR-2018 21:59:17
Uptime                    0 days 0 hr. 39 min. 16 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/oracle/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /home/oracle/app/oracle/diag/tnslsnr/12c01/andycdb_test/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=12c01)(PORT=1522)))
Services Summary...
Service "4f44590eb7b74390e0531018db0a1976" has 1 instance(s).
  Instance "andycdb", status READY, has 1 handler(s) for this service...
Service "andycdb" has 1 instance(s).
  Instance "andycdb", status READY, has 1 handler(s) for this service...
Service "andycdbXDB" has 1 instance(s).
  Instance "andycdb", status READY, has 1 handler(s) for this service...
Service "pdb01" has 1 instance(s).
  Instance "andycdb", status READY, has 1 handler(s) for this service...
The command completed successfully

-- 設(shè)置多個(gè)監(jiān)聽端口
SQL> alter system set local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST = 12c01)(PORT = 1522)),(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=12c01)(PORT=1521)))';
System altered.

以上是“oracle單實(shí)例如何監(jiān)聽修改端口”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對(duì)大家有所幫助,如果還想學(xué)習(xí)更多知識(shí),歡迎關(guān)注億速云行業(yè)資訊頻道!

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI