oracle 增加监听、端口

[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监听只能存在一个端口

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值