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】修改oracle監聽埠Oracle
- oracle rac scan監聽更改埠號Oracle
- 【Oracle】修改scan監聽器埠號Oracle
- Oracle 11g 修改監聽埠Oracle
- Oracle 修改預設監聽埠故障分析Oracle
- oracle之 單例項監聽修改埠Oracle單例
- ORACLE 修改11.2.0.4 RAC 預設監聽埠號1521為1621Oracle
- Oracle之 11gR2 RAC 修改監聽器埠號的步驟Oracle
- Oracle資料庫修改LISTENER的監聽埠Oracle資料庫
- [20160418]修改oracle監聽埠.txtOracle
- 修改oracle監聽佔用的8080埠(轉)Oracle
- 【監聽】配置服務端靜態(動態)監聽/修改監聽埠及引數local_listener作用服務端
- oracle 11g 修改預設監聽埠1521Oracle
- [20130422]修改oracle監聽埠.txtOracle
- 修改服務端監聽器埠號為1526服務端
- 初始化監聽埠
- samba程序與監聽埠Samba
- 【LISTENER】修改 LISTENER的監聽埠為1526(動態註冊)
- 【LISTENER】修改 LISTENER的監聽埠為1526(靜態註冊)
- Sqlserver重啟alwayson監聽埠SQLServer
- oracle 監聽配置多個埠Oracle
- windows10怎麼檢視監聽埠_windows10檢視監聽埠的方法Windows
- nginx 80埠監聽多個域名Nginx
- Oracle 建立非1521埠監聽Oracle
- Tomcat監聽443埠的方法Tomcat
- 如何更改oracle監聽器的埠Oracle
- rac監聽動態註冊
- mysql的啟動,以及修改偵聽埠。MySql
- 12c 如何為每個pdb對應一個靜態註冊的監聽埠
- 使用java程式,監聽tcp協議埠JavaTCP協議
- shell埠監聽異常郵箱告警
- wriesharek同時監聽多個埠
- 如何配置多個監聽器不同埠
- 【RAC】Oracle rac修改IP地址及埠號命令參考Oracle
- rac監聽不能動態註冊
- 11g rac監聽配置解析
- 一次RAC監聽停止分析
- rac的vip和監聽莫名故障