12C RAC 修改監聽埠
##修改san 監聽
#查scan listener在那個節點啟動 [root@rac1 ~]# /u01/app/gridhome/bin/crsctl stat res -t -------------------------------------------------------------------------------- Name Target State Server State details -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.ASMNET1LSNR_ASM.lsnr ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE ora.DATA01.dg ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE ora.LISTENER.lsnr ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE ora.MGMT.dg ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE ora.OCR.dg ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE ora.chad ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE ora.net1.network ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE ora.ons ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE ora.proxy_advm OFFLINE OFFLINE rac1 STABLE OFFLINE OFFLINE rac2 STABLE -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.LISTENER_SCAN1.lsnr 1 ONLINE ONLINE rac1 STABLE ora.MGMTLSNR 1 ONLINE ONLINE rac1 169.254.39.218 192.1 68.56.11 192.168.56. 13,STABLE ora.asm 1 ONLINE ONLINE rac1 Started,STABLE 2 ONLINE ONLINE rac2 Started,STABLE 3 OFFLINE OFFLINE STABLE ora.cvu 1 ONLINE ONLINE rac1 STABLE ora.mgmtdb 1 ONLINE ONLINE rac1 Open,STABLE ora.orcl.db 1 ONLINE ONLINE rac1 Open,HOME=/u01/app/o racle/product/12.2.0 /db_1,STABLE 2 ONLINE ONLINE rac2 Open,HOME=/u01/app/o racle/product/12.2.0 /db_1,STABLE ora.qosmserver 1 ONLINE ONLINE rac1 STABLE ora.rac1.vip 1 ONLINE ONLINE rac1 STABLE ora.rac2.vip 1 ONLINE ONLINE rac2 STABLE ora.scan1.vip 1 ONLINE ONLINE rac1 STABLE -------------------------------------------------------------------------------- #檢視當前的scan listener [root@rac1 ~]# /u01/app/gridhome/bin/srvctl config scan_listener SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521 Registration invited nodes: Registration invited subnets: SCAN Listener is enabled. SCAN Listener is individually enabled on nodes: SCAN Listener is individually disabled on nodes: [root@rac1 ~]# /u01/app/gridhome/bin/srvctl modify scan_listener -p 3521 [root@rac1 ~]# /u01/app/gridhome/bin/srvctl config scan_listener SCAN Listener LISTENER_SCAN1 exists. Port: TCP:3521 Registration invited nodes: Registration invited subnets: SCAN Listener is enabled. SCAN Listener is individually enabled on nodes: SCAN Listener is individually disabled on nodes: [root@rac1 ~]# su - grid Last login: Fri Apr 24 21:05:42 CST 2020 [grid@rac1 ~]$ lsnrctl status LISTENER_SCAN1 LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 24-APR-2020 21:06:24 Copyright (c) 1991, 2016, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1))) STATUS of the LISTENER ------------------------ Alias LISTENER_SCAN1 Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production Start Date 24-APR-2020 20:30:53 Uptime 0 days 0 hr. 35 min. 31 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/gridhome/network/admin/listener.ora Listener Log File /u01/app/grid/diag/tnslsnr/rac1/listener_scan1/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.3.155)(PORT=3521))) Services Summary... Service "-MGMTDBXDB" has 1 instance(s). Instance "-MGMTDB", status READY, has 1 handler(s) for this service... Service "_mgmtdb" has 1 instance(s). Instance "-MGMTDB", status READY, has 1 handler(s) for this service... Service "a14d818a45e036aae0539703a8c0a3e2" has 1 instance(s). Instance "-MGMTDB", status READY, has 1 handler(s) for this service... Service "gimr_dscrep_10" has 1 instance(s). Instance "-MGMTDB", status READY, has 1 handler(s) for this service... Service "orcl" has 2 instance(s). Instance "orcl1", status READY, has 1 handler(s) for this service... Instance "orcl2", status READY, has 1 handler(s) for this service... Service "orclXDB" has 2 instance(s). Instance "orcl1", status READY, has 1 handler(s) for this service... Instance "orcl2", status READY, has 1 handler(s) for this service... The command completed successfully #注意:如果這裡的監聽還是1521,需要重啟監聽 [root@rac1 ~]# /u01/app/gridhome/bin/srvctl stop scan_listener [root@rac1 ~]# /u01/app/gridhome/bin/srvctl start scan_listener #在例項內部檢視remore listener的埠 [oracle@rac1 ~]$ sqlplus /nolog SQL*Plus: Release 12.2.0.1.0 Production on Fri Apr 24 21:17:29 2020 Copyright (c) 1982, 2016, Oracle. All rights reserved. SQL> conn / as sysdba Connected. SQL> show parameter remote_listener NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ remote_listener string racscan:3521 SQL> #注意:如果這裡的埠還是1521可以手動修改 alter system set remote_listener='racscan:3521'; #檢視監聽狀態 [grid@rac1 ~]$ lsnrctl status LISTENER_SCAN1 LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 24-APR-2020 21:06:24 Copyright (c) 1991, 2016, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1))) STATUS of the LISTENER ------------------------ Alias LISTENER_SCAN1 Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production Start Date 24-APR-2020 20:30:53 Uptime 0 days 0 hr. 35 min. 31 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/gridhome/network/admin/listener.ora Listener Log File /u01/app/grid/diag/tnslsnr/rac1/listener_scan1/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.3.155)(PORT=3521))) Services Summary... Service "-MGMTDBXDB" has 1 instance(s). Instance "-MGMTDB", status READY, has 1 handler(s) for this service... Service "_mgmtdb" has 1 instance(s). Instance "-MGMTDB", status READY, has 1 handler(s) for this service... Service "a14d818a45e036aae0539703a8c0a3e2" has 1 instance(s). Instance "-MGMTDB", status READY, has 1 handler(s) for this service... Service "gimr_dscrep_10" has 1 instance(s). Instance "-MGMTDB", status READY, has 1 handler(s) for this service... Service "orcl" has 2 instance(s). Instance "orcl1", status READY, has 1 handler(s) for this service... Instance "orcl2", status READY, has 1 handler(s) for this service... Service "orclXDB" has 2 instance(s). Instance "orcl1", status READY, has 1 handler(s) for this service... Instance "orcl2", status READY, has 1 handler(s) for this service... The command completed successfully #測試連線 RaySuenMacBook-Pro:~ raysuen$ sqlplus system/oracle@192.168.3.155:3521/orcl SQL*Plus: Release 18.0.0.0.0 Production on Fri Apr 24 21:10:11 2020 Version 18.1.0.0.0 Copyright (c) 1982, 2018, Oracle. All rights reserved. Last Successful login time: Sat Mar 21 2020 10:25:30 +08:00 Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production SQL> show parameter name NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ cdb_cluster_name string orcl cell_offloadgroup_name string db_file_name_convert string db_name string orcl db_unique_name string orcl global_names boolean FALSE instance_name string orcl2 lock_name_space string log_file_name_convert string pdb_file_name_convert string processor_group_name string NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ service_names string orcl RaySuenMacBook-Pro:~ raysuen$ sqlplus system/oracle@192.168.3.155:3521/orcl SQL*Plus: Release 18.0.0.0.0 Production on Fri Apr 24 21:24:27 2020 Version 18.1.0.0.0 Copyright (c) 1982, 2018, Oracle. All rights reserved. Last Successful login time: Fri Apr 24 2020 21:24:01 +08:00 Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production SQL> show parameter name NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ cdb_cluster_name string orcl cell_offloadgroup_name string db_file_name_convert string db_name string orcl db_unique_name string orcl global_names boolean FALSE instance_name string orcl1 lock_name_space string log_file_name_convert string pdb_file_name_convert string processor_group_name string NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ service_names string orcl
##修改本地監聽listener
#檢視listener的埠 [root@rac1 ~]# /u01/app/gridhome/bin/srvctl config listener Name: LISTENER Type: Database Listener Network: 1, Owner: grid Home: <CRS home> End points: TCP:1521 Listener is enabled. Listener is individually enabled on nodes: Listener is individually disabled on nodes: [root@rac2 ~]# /u01/app/gridhome/bin/srvctl config listener Name: LISTENER Type: Database Listener Network: 1, Owner: grid Home: <CRS home> End points: TCP:1521 Listener is enabled. Listener is individually enabled on nodes: Listener is individually disabled on nodes: #修改listener的埠為3521 [root@rac1 ~]# /u01/app/gridhome/bin/srvctl modify listener -l LISTENER -p "TCP:3521" [root@rac1 ~]# /u01/app/gridhome/bin/srvctl config listener Name: LISTENER Type: Database Listener Network: 1, Owner: grid Home: <CRS home> End points: TCP:3521 Listener is enabled. Listener is individually enabled on nodes: Listener is individually disabled on nodes: [root@rac2 ~]# /u01/app/gridhome/bin/srvctl config listener Name: LISTENER Type: Database Listener Network: 1, Owner: grid Home: <CRS home> End points: TCP:3521 Listener is enabled. Listener is individually enabled on nodes: Listener is individually disabled on nodes: [grid@rac1 ~]$ lsnrctl stat LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 24-APR-2020 21:30:57 Copyright (c) 1991, 2016, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production Start Date 24-APR-2020 20:30:51 Uptime 0 days 1 hr. 0 min. 6 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/gridhome/network/admin/listener.ora Listener Log File /u01/app/grid/diag/tnslsnr/rac1/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.3.151)(PORT=3521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.3.153)(PORT=3521))) Services Summary... Service "+ASM" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Service "+ASM_DATA01" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Service "+ASM_MGMT" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Service "+ASM_OCR" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Service "orcl" has 1 instance(s). Instance "orcl1", status READY, has 1 handler(s) for this service... Service "orclXDB" has 1 instance(s). Instance "orcl1", status READY, has 1 handler(s) for this service... The command completed successfully #注意:如果監聽狀態的埠為原埠(1521),需要重啟監聽 [root@rac1 ~]# /u01/app/gridhome/bin/srvctl stop listener [root@rac1 ~]# /u01/app/gridhome/bin/srvctl start listener #檢視例項內的本地監聽local listener [oracle@rac1 ~]$ sqlplus /nolog SQL*Plus: Release 12.2.0.1.0 Production on Fri Apr 24 21:36:07 2020 Copyright (c) 1982, 2016, Oracle. All rights reserved. SQL> conn / as sysdba Connected. SQL> show parameter local_listener NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ local_listener string (ADDRESS=(PROTOCOL=TCP)(HOST= 192.168.3.153)(PORT=3521)) SQL> #注意:如果local_listener引數的埠為原埠1521,需要手工修改埠 alter system set local_listener=' (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.3.153)(PORT=3521)) sid='orcl1'; alter system set local_listener=' (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.3.154)(PORT=3521)) sid='orcl2'; #檢視監聽狀態 [grid@rac1 ~]$ lsnrctl stat LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 24-APR-2020 21:30:57 Copyright (c) 1991, 2016, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production Start Date 24-APR-2020 20:30:51 Uptime 0 days 1 hr. 0 min. 6 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/gridhome/network/admin/listener.ora Listener Log File /u01/app/grid/diag/tnslsnr/rac1/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.3.151)(PORT=3521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.3.153)(PORT=3521))) Services Summary... Service "+ASM" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Service "+ASM_DATA01" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Service "+ASM_MGMT" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Service "+ASM_OCR" has 1 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Service "orcl" has 1 instance(s). Instance "orcl1", status READY, has 1 handler(s) for this service... Service "orclXDB" has 1 instance(s). Instance "orcl1", status READY, has 1 handler(s) for this service... The command completed successfully #客戶端測試連線 RaySuenMacBook-Pro:~ raysuen$ sqlplus system/oracle@192.168.3.153:3521/orcl SQL*Plus: Release 18.0.0.0.0 Production on Fri Apr 24 21:32:45 2020 Version 18.1.0.0.0 Copyright (c) 1982, 2018, Oracle. All rights reserved. Last Successful login time: Fri Apr 24 2020 21:32:15 +08:00 Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production SQL> show parameter name NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ cdb_cluster_name string orcl cell_offloadgroup_name string db_file_name_convert string db_name string orcl db_unique_name string orcl global_names boolean FALSE instance_name string orcl1 lock_name_space string log_file_name_convert string pdb_file_name_convert string processor_group_name string NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ service_names string orcl SQL> exit Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production RaySuenMacBook-Pro:~ raysuen$ sqlplus system/oracle@192.168.3.154:3521/orcl SQL*Plus: Release 18.0.0.0.0 Production on Fri Apr 24 21:33:02 2020 Version 18.1.0.0.0 Copyright (c) 1982, 2018, Oracle. All rights reserved. Last Successful login time: Fri Apr 24 2020 21:32:37 +08:00 Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production SQL> show parameter name NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ cdb_cluster_name string orcl cell_offloadgroup_name string db_file_name_convert string db_name string orcl db_unique_name string orcl global_names boolean FALSE instance_name string orcl2 lock_name_space string log_file_name_convert string pdb_file_name_convert string processor_group_name string NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ service_names string orcl
##修改ASM的本地監聽local_listener(12C 以後會自動修改,不需要手動修改)
[grid@rac1 ~]$ sqlplus /nolog SQL*Plus: Release 12.2.0.1.0 Production on Fri Apr 24 21:45:25 2020 Copyright (c) 1982, 2016, Oracle. All rights reserved. SQL> conn / as sysasm Connected. SQL> show parameter local_listener NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ local_listener string (ADDRESS=(PROTOCOL=TCP)(HOST= 192.168.3.153)(PORT=3521)) #注意:如果埠為源埠修改本地監聽埠 alter system set local_listener=' (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.3.153)(PORT=3521)) sid='+ASM1'; alter system set local_listener=' (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.3.154)(PORT=3521)) sid='+ASM2';
參考的官方文件號:972500.1 How to Modify SCAN Setting or SCAN Listener Port after Installation (Doc ID 972500.1)
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28572479/viewspace-2732299/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle rac scan監聽更改埠號Oracle
- oracle之 單例項監聽修改埠Oracle單例
- Oracle 修改預設監聽埠故障分析Oracle
- 初始化監聽埠
- samba程序與監聽埠Samba
- 【RAC】Oracle rac修改IP地址及埠號命令參考Oracle
- Oracle 建立非1521埠監聽Oracle
- 11g rac監聽配置解析
- rac監聽不能動態註冊
- windows10怎麼檢視監聽埠_windows10檢視監聽埠的方法Windows
- nginx 80埠監聽多個域名Nginx
- Oracle 11g RAC 監聽日常管理Oracle
- 如何在rac環境中增加監聽
- shell埠監聽異常郵箱告警
- 使用java程式,監聽tcp協議埠JavaTCP協議
- oracle rac的scan監聽狀態Not All Endpoints RegisteredOracle
- 監聽檔案修改的四種方法
- linux系統中監聽埠概念是什麼?Linux
- ssh遠端埠轉發無法監聽0.0.0.0
- 【RAC】如何修改SCAN IP的IP地址、名稱、埠等資訊
- Oracle 11g/12c 監聽器白名單的配置Oracle
- 使用JavaScript給物件修改註冊監聽器JavaScript物件
- zabbix-agent啟動之後10050埠未監聽
- 如何修改監聽異常的優先順序
- 監聽 watch props物件屬性監聽 或深度監聽物件
- Oracle 12c 使用RMAN搭建物理備庫(RAC to RAC)Oracle
- RAC修改IP地址
- 【RAC】Oracle RAC如何修改心跳網路Oracle
- SSH修改埠
- Windows平臺如何修改監聽的服務名稱?Windows
- Oracle 12c rac ocr和votedisk管理Oracle
- 【RAC】Oracle rac 如何修改公網及vipOracle
- 獲取執行埠監聽的使用者身份auth-owner
- docker 修改port 埠Docker
- windowns 修改RDP埠
- Oracle 12C RAC CDB資料庫部署Oracle資料庫
- oracle 12c rac 詳細部署教程(二)Oracle
- oracle 12c rac 詳細部署教程(一)Oracle