侧边栏壁纸
博主头像
落叶人生博主等级

走进秋风,寻找秋天的落叶

  • 累计撰写 130562 篇文章
  • 累计创建 28 个标签
  • 累计收到 9 条评论
标签搜索

目 录CONTENT

文章目录

监听

2023-12-05 星期二 / 0 评论 / 0 点赞 / 96 阅读 / 4793 字

监听动态注册 pmon alter system register; lsnrctl status ready:动态注册 unknow:静态注册 一个数据库只需要一个监听listener.ora 一

监听动态注册
pmon
alter system register;
lsnrctl status
ready:动态注册
unknow:静态注册

一个数据库只需要一个监听listener.ora
一个监听可以监听多个数据库
一个监听可以监听多个实例

1    配置动态监听

使用netca 创建动态的监听。在oracle 用户下运行. .db 设置好环境变量后运行netca 

说明系统当前动态监听已经在运行,需要有先关闭监听

[root@myyun1 oracle]# lsnrctl statusLSNRCTL for Linux: Version 11.2.0.3.0 - Production on 09-DEC-2016 21:12:19Copyright (c) 1991, 2011, Oracle.  All rights reserved.Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))STATUS of the LISTENER------------------------Alias                     LISTENERVersion                   TNSLSNR for Linux: Version 11.2.0.3.0 - ProductionStart Date                26-NOV-2016 16:01:23Uptime                    13 days 5 hr. 10 min. 56 secTrace Level               offSecurity                  ON: Local OS AuthenticationSNMP                      OFFListener Log File         /data/vdb/u01/product/oracle/diag/tnslsnr/VM_1_54_centos/listener/alert/log.xmlListening Endpoints Summary...  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))Services Summary...Service "base2" has 1 instance(s).  Instance "base2", status READY, has 1 handler(s) for this service...Service "myyun1.orcl" has 2 instance(s).  Instance "myvm1", status BLOCKED, has 1 handler(s) for this service...  Instance "myyun1", status READY, has 1 handler(s) for this service...Service "myyun1XDB.orcl" has 1 instance(s).  Instance "myyun1", status READY, has 1 handler(s) for this service...The command completed successfully# 现在当前监听状态我运行状态,先关闭

动态监听配置启动成功


使用netmgr 创建静态监听

    先关闭监听

[root@myyun1 admin]# lsnrctl stopLSNRCTL for Linux: Version 11.2.0.3.0 - Production on 09-DEC-2016 21:40:00Copyright (c) 1991, 2011, Oracle.  All rights reserved.Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))The command completed successfully


配置tnsnames.ora

[oracle@myyun1 admin]$ ll tnsnames.ora -rw-r--r-- 1 oracle dba 335 12月  9 21:34 tnsnames.ora# tnsnames.ora 文件生成成功# tnsnames.ora Network Configuration File: /data/vdb/u01/product/oracle/11g/network/admin/tnsnames.ora# Generated by Oracle configuration tools.MYYUN1 =  (DESCRIPTION =    (ADDRESS_LIST =      (ADDRESS = (PROTOCOL = TCP)(HOST = 139.199.66.81)(PORT = 1521))    )    (CONNECT_DATA =      (SERVICE_NAME = myyun1.orcl)    )  )# 现在可以通过生成的tns 解析进行远程登录[root@myyun1 admin]# sqlplus scott/tiger@myyun1SQL*Plus: Release 11.2.0.3.0 Production on Fri Dec 9 21:37:08 2016Copyright (c) 1982, 2011, Oracle.  All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options# 远程登录成功

 

广告 广告

评论区