oracle外网监听端口,oracle 增加监听、端口 冷不防 2023-01-18 05:27 131阅读 0赞 \[grid@rac1 ~\]$ srvctl add listener -l LISTENER5 -o $ORACLE\_HOME -p 1588 -k 1 \[grid@rac1 ~\]$ srvctl start listener -l LISTENER5 \[grid@rac1 ~\]$ vim /u01/app/11.2.0.4/grid/network/admin/listener.ora \[grid@rac1 ~\]$ srvctl stop listener -l LISTENER5 \[grid@rac1 ~\]$ srvctl stop listener -l LISTENER5 PRCC-1016 : LISTENER5 was already stopped PRCR-1005 : Resource ora.LISTENER5.lsnr is already stopped \[grid@rac1 ~\]$ srvctl start listener -l LISTENER5 \[grid@rac1 ~\]$ lsnrctl status LISTENER5 LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 10-SEP-2020 05:56:23 Copyright (c) 1991, 2013, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER5))) STATUS of the LISTENER \------------------------ Alias LISTENER5 Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production Start Date 10-SEP-2020 05:56:12 Uptime 0 days 0 hr. 0 min. 11 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/11.2.0.4/grid/network/admin/listener.ora Listener Log File /u01/app/11.2.0.4/grid/log/diag/tnslsnr/rac1/listener5/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER5))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.29.151)(PORT=1588))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.29.130)(PORT=1588))) Services Summary... Service "testdb" has 1 instance(s). Instance "testdb1", status UNKNOWN, has 1 handler(s) for this service... The command completed successfully \[grid@rac1 ~\]$ srvctl status listener Listener LISTENER is enabled Listener LISTENER is running on node(s): rac1 Listener LISTENER4 is enabled Listener LISTENER4 is running on node(s): rac1 Listener LISTENER5 is enabled Listener LISTENER5 is running on node(s): rac1 Listener LISTENER\_ADG is enabled Listener LISTENER\_ADG is running on node(s): rac1 \[grid@rac1 ~\]$ su - oracle Password: \[oracle@rac1 ~\]$ sqlplus / as sysdba SQL\*Plus: Release 11.2.0.4.0 Production on Thu Sep 10 05:57:15 2020 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> show parameter local\_listener NAME TYPE VALUE \------------------------------------ ----------- ------------------------------ local\_listener string (ADDRESS=(PROTOCOL=TCP)(HOST=1 92.168.29.130)(PORT=1521)), (A DDRESS=(PROTOCOL=TCP)(HOST=192 .168.29.130)(PORT=1522)), (ADD RESS=(PROTOCOL=TCP)(HOST=192.1 68.29.130)(PORT=1524)) SQL> alter system set local\_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.29.130)(PORT=1521))','(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.29.130)(PORT=1522))','(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.29.130)(PORT=1524))','(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.29.130)(PORT=1588))'; System altered. SQL> EXIT \[oracle@rac1 ~\]$ su - grid Password: \[grid@rac1 ~\]$ srvctl stop scan\_listener PRCC-1016 : LISTENER4\_SCAN1 was already stopped PRCR-1005 : Resource ora.LISTENER4\_SCAN1.lsnr is already stopped \[grid@rac1 ~\]$ srvctl remove scan\_listener Remove scan listener? (y/\[n\]) y \[grid@rac1 ~\]$ srvctl config scan\_listener PRCS-1026 : Could not find Single Client Access Name listener resources TYPE=ora.scan\_listener.type \[grid@rac1 ~\]$ srvctl add scan\_listener -l LSNR5 -p 1588 \[grid@rac1 ~\]$ srvctl config scan\_listener SCAN Listener LSNR5\_SCAN1 exists. Port: TCP:1588 \[grid@rac1 ~\]$ srvctl start scan\_listener \[grid@rac1 ~\]$ su - oracle Password: \[oracle@rac1 ~\]$ sqlplus / as sysdba SQL\*Plus: Release 11.2.0.4.0 Production on Thu Sep 10 06:17:42 2020 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> show parameter remote\_listener NAME TYPE VALUE \------------------------------------ ----------- ------------------------------ remote\_listener string rac-scan:1524 SQL> alter system set remote\_listener='rac-scan:1588'; System altered. SQL> show parameter remote\_listener NAME TYPE VALUE \------------------------------------ ----------- ------------------------------ remote\_listener string rac-scan:1588 普通监听可以存在多个端口,scan监听只能存在一个端口
还没有评论,来说两句吧...