返回顶部
首页 > 资讯 > 数据库 >srvctl怎样添加新的监听和端口并静态注册
  • 808
分享到

srvctl怎样添加新的监听和端口并静态注册

2024-04-02 19:04:59 808人浏览 安东尼
摘要

本篇文章给大家分享的是有关srvctl怎样添加新的监听和端口并静态注册,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。 [grid@c

本篇文章给大家分享的是有关srvctl怎样添加新的监听和端口并静态注册,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。

[grid@cent6-ora11-ip16 ~]$ /u01/gridhome/11g/bin/srvctl add listener -h


Adds a listener configuration to the oracle Clusterware.


Usage: srvctl add listener [-l <lsnr_name>] [-s] [-p "[tcp:]<port>[, ...][/IPC:<key>][/NMP:<pipe_name>][/TCPS:<s_port>] [/SDP:<port>]"] [-o <oracle_home>] [-k <net_num>]

    -l <lsnr_name>           Listener name (default name is LISTENER)       #监听名称

    -o <oracle_home>         ORACLE_HOME path (default value is CRS_HOME)   #grid的home目录

    -k <net_num>             network number (default number is 1)  #最开始查看的网络

    -s                       Skip the checking of ports

    -p "[TCP:]<port>[, ...][/IPC:<key>][/NMP:<pipe_name>][/TCPS:<s_port>] [/SDP:<port>]"       Comma separated tcp ports or listener endpoints   #指定端口号

    -h                       Print usage

[grid@cent6-ora11-ip16 ~]$ /u01/gridhome/11g/bin/srvctl add listener -l LISTENER2 -o $ORACLE_HOME -p 3521 -k 1    

[grid@cent6-ora11-ip16 ~]$ /u01/gridhome/11g/bin/srvctl start listener -l LISTENER2

[grid@cent6-ora11-ip16 admin]$ ls -lh

total 32K

-rw-r--r--  1 grid oinstall  413 Feb  7 09:04 endpoints_listener.ora

-rw-r--r--. 1 grid oinstall  206 Sep 15 14:24 endpoints_listener.ora.bak.cent6-ora11-ip16

-rw-r--r--. 1 grid oinstall  184 Sep 15 14:24 listener1709152PM2404.bak

-rw-r--r--  1 grid oinstall  519 Feb  7 09:04 listener.ora

-rw-r--r--. 1 grid oinstall  350 Sep 15 14:24 listener.ora.bak.cent6-ora11-ip16

drwxr-xr-x. 2 grid oinstall 4.0K Sep 15 13:29 samples

-rw-r--r--. 1 grid oinstall  381 Dec 17  2012 shrept.lst

-rw-r--r--. 1 grid oinstall  229 Sep 15 14:24 sqlnet.ora

[grid@cent6-ora11-ip16 admin]$ cat listener.ora

LISTENER2=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER2))))          # line added by Agent

LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))            # line added by Agent

LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1))))                # line added by Agent

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON                # line added by Agent

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON              # line added by Agent

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER2=ON             # line added by Agent

[grid@cent6-ora11-ip16 admin]$ cat endpoints_listener.ora

LISTENER2_CENT6-ORA11-IP16=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=cent6-ora11-ip16-vip)(PORT=3521))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.56.16)(PORT=3521)(IP=FIRST))))         # line added by Agent

LISTENER_CENT6-ORA11-IP16=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=cent6-ora11-ip16-vip)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.56.16)(PORT=1521)(IP=FIRST))))          # line added by Agent

#静态注册

[grid@cent6-ora11-ip16 admin]$ vi listener.ora    

SID_LIST_LISTENER2 = #对应的监听名

  (SID_LIST =

    (SID_DESC =

      (GLOBAL_DBNAME = RACDB)

      (ORACLE_HOME = /u01/gridhome/11g)

      (SID_NAME = RACDB1) #节点对应的SID

    )

  )



LISTENER2=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER2))))          # line added by Agent

LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))            # line added by Agent

LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1))))                # line added by Agent

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON                # line added by Agent

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON              # line added by Agent

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER2=ON             # line added by Agent

[grid@cent6-ora11-ip16 admin]$ srvctl stop listener -l LISTENER2

[grid@cent6-ora11-ip16 admin]$ srvctl start listener -l LISTENER2

[grid@cent6-ora11-ip16 admin]$ lsnrctl status LISTENER2


LSNRCTL for linux: Version 11.2.0.4.0 - Production on 07-FEB-2018 09:21:14


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


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER2)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER2

Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production

Start Date                07-FEB-2018 09:20:46

Uptime                    0 days 0 hr. 0 min. 28 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /u01/gridhome/11g/network/admin/listener.ora

Listener Log File         /u01/gridhome/11g/log/diag/tnslsnr/cent6-ora11-ip16/listener2/alert/log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER2)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.56.16)(PORT=3521)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.56.18)(PORT=3521)))

Services Summary...

Service "RACDB" has 1 instance(s).

  Instance "RACDB1", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully

以上就是srvctl怎样添加新的监听和端口并静态注册,小编相信有部分知识点可能是我们日常工作会见到或用到的。希望你能通过这篇文章学到更多知识。更多详情敬请关注编程网数据库频道。

您可能感兴趣的文档:

--结束END--

本文标题: srvctl怎样添加新的监听和端口并静态注册

本文链接: https://lsjlt.com/news/68507.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

猜你喜欢
  • srvctl怎样添加新的监听和端口并静态注册
    本篇文章给大家分享的是有关srvctl怎样添加新的监听和端口并静态注册,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。 [grid@c...
    99+
    2024-04-02
  • Oracle监听的静态注册和动态注册
    静态注册:通过解析listene.ora文件 动态注册:由PMON进程动态注册至监听中 在没有listener.ora配置文件的情况下,如果启动监听,则监听为动态注册。用图形化netca创建...
    99+
    2024-04-02
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作