Oracle Grid Infrastructure 18.3.0 Listener静态注册

18c版本的GI,监听默认是在grid用户下面,监听启停管理都是以grid用户身份而不是使用oracle用户。

主备库的监听状态

[grid@node ~]$ lsnrctl status

LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 06-MAR-2019 14:07:46

Copyright (c) 1991, 2018, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=node)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 18.0.0.0.0 - Production
Start Date                28-FEB-2019 15:06:25
Uptime                    5 days 23 hr. 1 min. 20 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /app/grid/product/18.3.0/crs/network/admin/listener.ora
Listener Log File         /app/grid/diag/tnslsnr/node/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=node)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM", status READY, has 1 handler(s) for this service...
Service "+ASM_DATA" has 1 instance(s).
  Instance "+ASM", status READY, has 1 handler(s) for this service...
Service "81d758ce79e64921e0538900060aa9b5" has 1 instance(s).
  Instance "eighteenc", status READY, has 1 handler(s) for this service...
Service "81d844e5dcd02b18e0538900060aa548" has 1 instance(s).
  Instance "eighteenc", status READY, has 1 handler(s) for this service...
Service "eighteenc" has 1 instance(s).
  Instance "eighteenc", status READY, has 1 handler(s) for this service...
Service "eighteencXDB" has 1 instance(s).
  Instance "eighteenc", status READY, has 1 handler(s) for this service...
Service "pdb01" has 1 instance(s).
  Instance "eighteenc", status READY, has 1 handler(s) for this service...
The command completed successfully

============================================================================================================


[grid@nodedg ~]$ lsnrctl status

LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 06-MAR-2019 14:08:40

Copyright (c) 1991, 2018, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 18.0.0.0.0 - Production
Start Date                28-FEB-2019 15:42:49
Uptime                    5 days 22 hr. 25 min. 51 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /app/grid/diag/tnslsnr/nodedg/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=nodedg)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM", status READY, has 1 handler(s) for this service...
Service "+ASM_DATA" has 1 instance(s).
  Instance "+ASM", status READY, has 1 handler(s) for this service...
Service "dg" has 1 instance(s).
  Instance "dg", status READY, has 1 handler(s) for this service...
Service "dgXDB" has 1 instance(s).
  Instance "dg", status READY, has 1 handler(s) for this service...
Service "pdb01" has 1 instance(s).
  Instance "dg", status READY, has 1 handler(s) for this service...
The command completed successfully

 主库监听配置是通过netca创建,备库1522端口监听是静态注册

[grid@node ~]$ cd $ORACLE_HOME/network/admin
[grid@node admin]$ pwd
/app/grid/product/18.3.0/crs/network/admin
[grid@node admin]$ ls
listener.ora  samples  shrept.lst  sqlnet.ora
[grid@node admin]$ more listener.ora 
#Backup file is  /app/grid/product/18.3.0/crs/srvm/admin/listener.ora.bak.node line added by Agent
# listener.ora Network Configuration File: /app/grid/product/18.3.0/crs/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = node)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON		# line added by Agent
VALID_NODE_CHECKING_REGISTRATION_LISTENER=ON		# line added by Agent


============================================================================================================


[grid@nodedg ~]$ cd $ORACLE_HOME/network/admin
[grid@nodedg admin]$ pwd
/app/grid/product/18.3.0/crs/network/admin
[grid@nodedg admin]$ ls
listener.ora  samples  shrept.lst  sqlnet.ora
[grid@nodedg admin]$ more listener.ora 
#Backup file is  /app/grid/product/18.3.0/crs/srvm/admin/listener.ora.bak.nodedg line added by Agent
# listener.ora Network Configuration File: /app/grid/product/18.3.0/crs/network/admin/listener.ora
# Generated by Oracle configuration tools.

#LISTENER =
#  (DESCRIPTION_LIST =
#    (DESCRIPTION =
#      (ADDRESS = (PROTOCOL = TCP)(HOST = nodedg)(PORT = 1521))
#      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
#    )
#  )

NODEDG =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = nodedg)(PORT = 1522))
    )
  )

ADR_BASE_LMIS = /app/oracle

SID_LIST_NODEDG =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = eighteen)
      (ORACLE_HOME = /app/oracle/product/18.3.0/dbhome_1)
      (SID_NAME = dg)
    )
  )

#ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON		# line added by Agent
#VALID_NODE_CHECKING_REGISTRATION_LISTENER=ON		# line added by Agent


静态监听配置

--添加的监听,监名可以自定义

NODEDG =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = nodedg)(PORT = 1522))
    )
  )

--服务名列表,要静态注册那些服务。SID_NAME是你想要静态注册的服务名,可以自定义名

SID_LIST_NODEDG =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = eighteen)
      (ORACLE_HOME = /app/oracle/product/18.3.0/dbhome_1)
      (SID_NAME = dg)
    )
  )

注:NODEDG监听名,SID_LIST_NODEDG是注册表,注册表的名字不能随意定义,否者配置静态监听不会成功,会出现下面信息(The listener supports no services The command completed successfully),服务列表名字是:SID_LIST_加上监听名字。
 

[grid@nodedg admin]$ lsnrctl status

LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 06-MAR-2019 14:22:59

Copyright (c) 1991, 2018, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 18.0.0.0.0 - Production
Start Date                28-FEB-2019 15:42:49
Uptime                    5 days 22 hr. 40 min. 10 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /app/grid/diag/tnslsnr/nodedg/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=nodedg)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM", status READY, has 1 handler(s) for this service...
Service "+ASM_DATA" has 1 instance(s).
  Instance "+ASM", status READY, has 1 handler(s) for this service...
Service "dg" has 1 instance(s).
  Instance "dg", status READY, has 1 handler(s) for this service...
Service "dgXDB" has 1 instance(s).
  Instance "dg", status READY, has 1 handler(s) for this service...
Service "pdb01" has 1 instance(s).
  Instance "dg", status READY, has 1 handler(s) for this service...
The command completed successfully
[grid@nodedg admin]$ lsnrctl status nodedg

LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 06-MAR-2019 14:23:08

Copyright (c) 1991, 2018, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=nodedg)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias                     nodedg
Version                   TNSLSNR for Linux: Version 18.0.0.0.0 - Production
Start Date                06-MAR-2019 09:17:21
Uptime                    0 days 5 hr. 5 min. 46 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /app/grid/product/18.3.0/crs/network/admin/listener.ora
Listener Log File         /app/grid/diag/tnslsnr/nodedg/nodedg/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=nodedg)(PORT=1522)))
Services Summary...
Service "eighteen" has 1 instance(s).
  Instance "dg", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

可以看到eighteen服务都注册到了1522端口上面的监听上了。到此如何添加非1521默认端口以及如何静态注册多个服务也成功完成。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值