【RAC】srvctl管理工具新增新監聽和靜態註冊
srvctl 新增監聽的語法如下:
grid@rac1:/home/grid>srvctl add listener -h
將監聽程式配置新增到 Oracle Clusterware。
用法: srvctl add listener [-l <lsnr_name>] [-s] [-p "[TCP:]<port>[, ...][/IPC:<key>][/NMP:<pipe_name>][/TCPS:<s_port>] [/SDP:<port>]"] [-o <oracle_home>] [-k <net_num>]
-l <lsnr_name> 監聽程式名稱 (預設名稱為 LISTENER)
-o <oracle_home> ORACLE_HOME 路徑 (預設值為 CRS_HOME)
-k <net_num> 網路編號 (預設編號為 1)
-s 跳過埠檢查
-p "[TCP:]<port>[, ...][/IPC:<key>][/NMP:<pipe_name>][/TCPS:<s_port>] [/SDP:<port>]" 逗號分隔的 TCP 埠或監聽程式端點
-h 輸出用法
加入新的監聽YANGQL
grid@rac1:/home/grid>srvctl add listener -l YANGQL -p 1524 -o $ORACLE_HOME
grid@rac1:/home/grid>cat /opt/11202/11.2.0/grid/network/admin/listener.ora
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # line added by Agent
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))) # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent
grid@rac1:/home/grid>srvctl add listener -l YANGQL -p 1524 -o $ORACLE_HOME -k 1
PRCN-3004 : 監聽程式YANGQL已存在
k 值在加入的時候,不做指定也是可以的!預設為1!
grid@rac1:/home/grid>
grid@rac1:/home/grid>
啟動新加入的監聽YANGQL ,
grid@rac1:/home/grid>srvctl start listener -l YANGQL
listener.ora ,endpoints_listener.ora 兩個檔案會多出 新加入的監聽資訊:
grid@rac1:/home/grid>cat /opt/11202/11.2.0/grid/network/admin/listener.ora
YANGQL=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=YANGQL)))) # line added by Agent
grid@rac1:/home/grid>cat /opt/11202/11.2.0/grid/network/admin/endpoints_listener.ora
YANGQL_RAC1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rac1-vip)(PORT=1524))(ADDRESS=(PROTOCOL=TCP)(HOST=10.250.7.225)(PORT=1524)(IP=FIRST)))) # line added by Agent
LISTENER_RAC1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rac1-vip)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=10.250.7.225)(PORT=1521)(IP=FIRST)))) # line added by Agent
手工修改listener.ora 加入靜態監聽!
grid@rac1:/home/grid>vim /opt/11202/11.2.0/grid/network/admin/listener.ora
SID_LIST_YANGQL =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = rac)
(ORACLE_HOME = /opt/11202/11.2.0/grid)
(SID_NAME =rac1)
)
)
YANGQL=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=YANGQL)))) # line added by Agent
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # line added by Agent
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))) # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_YANGQL=ON # line added by Agent
"/opt/11202/11.2.0/grid/network/admin/listener.ora" 15L, 665C 已寫入
重新啟動監聽YANGQL
grid@rac1:/home/grid>srvctl stop listener -l YANGQL
grid@rac1:/home/grid>srvctl start listener -l YANGQL
檢視其狀態:
grid@rac1:/home/grid>lsnrctl status YANGQL
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 04-DEC-2011 22:32:08
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=YANGQL)))
STATUS of the LISTENER
------------------------
Alias YANGQL
Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date 04-DEC-2011 22:31:59
Uptime 0 days 0 hr. 0 min. 9 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/11202/11.2.0/grid/network/admin/listener.ora
Listener Log File /opt/11202/11.2.0/grid/log/diag/tnslsnr/rac1/yangql/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=YANGQL)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.250.7.225)(PORT=1524)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.250.7.111)(PORT=1524)))
Services Summary...
Service "rac" has 1 instance(s).
Instance "rac1", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
grid@rac1:/home/grid>
至此,操作完畢,當然也可以使用圖形介面工具來操作,但是個人覺得手工使用srvctl 工具更加方便!
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26224914/viewspace-2144806/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- rac監聽不能動態註冊
- 動態註冊和靜態註冊
- oracle的靜態註冊和動態註冊Oracle
- oracle靜態監聽Oracle
- Oracle 19C 監聽無法動態註冊例項Oracle
- Android廣播之靜態註冊Android
- 使用JavaScript給物件修改註冊監聽器JavaScript物件
- Nacos - 事件的註冊、取消與監聽(EventDispatcher)事件
- oracle rac的scan監聽狀態Not All Endpoints RegisteredOracle
- js 註冊事件的兩種方式詳解,傳統註冊事件與方法監聽註冊事件(addEventListener)JS事件dev
- [20190306]靜態監聽配置sid大小寫問題.txt
- [20180509]配置靜態監聽服務與ORA-12514
- 一次Oracle監聽無法動態註冊處理過程排查分析Oracle
- windows 新增和刪除靜態路由Windows路由
- 【ASK_ORACLE】Oracle 12.2 Bug導致網路卡出現故障後RAC庫未向TCP註冊本地VIP監聽OracleTCP
- RAC 管理(crs_stat、crsctl、srvctl)
- 11g rac監聽配置解析
- oracle rac scan監聽更改埠號Oracle
- 12C RAC 修改監聽埠
- 4.5.1.5 srvctl 新增服務
- Oracle靜態監聽中SID_NAME區分大小寫嗎?Oracle
- Oracle 11g RAC 監聽日常管理Oracle
- 如何在rac環境中增加監聽
- SRVCTL 刪除和新增資料庫服務資料庫
- ORACLE之手動註冊監聽listener。alter system set local_listener="XXX"Oracle
- 資料庫無法註冊至監聽服務解決辦法資料庫
- mac/linux 新增靜態路由MacLinux路由
- 寶塔如何新增偽靜態
- Oracle RAC環境新增新的network和listener(未完成)Oracle
- [20190201]測試服務名支援靜態和動態註冊的情況下優先選擇那個.txt
- Android中動態註冊Android
- vue動態註冊元件Vue元件
- oracle 12c 新增的LREG程式及其動態註冊的過程Oracle
- 屬性和監聽
- 偽靜態、靜態和動態的區別
- centos7 永久新增靜態路由CentOS路由
- 【RAC】Oracle RAC12c+ srvctl操作命令變化(引數更嚴謹了)Oracle
- rac 新增第二public ip 和 vip
- oracle 12c 資料庫例項監聽無法註冊問題一例Oracle資料庫