Oracle 监听之动态和静态注册
Posted ITPUB
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Oracle 监听之动态和静态注册相关的知识,希望对你有一定的参考价值。
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = edbjr2p1.example.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
LSNR2 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = edbjr2p1.example.com)(PORT = 1526))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1526))
)
)
[oracle@edbjr2p1 admin]$ lsnrctl status lsnr2
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 05-JUL-2016 23:34:29
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=edbjr2p1.example.com)(PORT=1526)))
STATUS of the LISTENER
------------------------
Alias lsnr2
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date 05-JUL-2016 23:34:06
Uptime 0 days 0 hr. 0 min. 22 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/edbjr2p1/lsnr2/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=edbjr2p1.example.com)(PORT=1526)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1526)))
The listener supports no services
The command completed successfully
LSNR2 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = edbjr2p1.example.com)(PORT = 1526))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1526))
)
)
sqlplus / as sysdba
SQL> alter system set local_listener='lSNR2';
SQL> alter system register; ### 动态监听如果先于数据库启动,那就不必要执行这个命令。
[oracle@edbjr2p1 admin]$ lsnrctl status lsnr2
。。。。。。。
Services Summary...Service "PROD1.us.oracle.com" has 1 instance(s).Instance "PROD1", status READY, has 1 handler(s) for this service...Service "PROD1XDB.us.oracle.com" has 1 instance(s).Instance "PROD1", status READY, has 1 handler(s) for this service...The command completed successfully
[oracle@edbjr2p1 admin]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 05-JUL-2016 23:34:29
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=edbjr2p1.example.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias listener
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date 05-JUL-2016 23:34:06
Uptime 0 days 0 hr. 0 min. 22 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/edbjr2p1/lsnr2/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=edbjr2p1.example.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1526)))
The listener supports no services
The command completed successfully
02
[oracle@edbjr2p1 admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = edbjr2p1.example.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=PROD1)
(ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME=PROD1))
(SID_DESC=
(SID_NAME=plsextproc)
(ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
(PROGRAM=extproc)))
[oracle@edbjr2p1 admin]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 05-JUL-2016 23:45:04
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=edbjr2p1.example.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date 05-JUL-2016 23:43:44
Uptime 0 days 0 hr. 1 min. 20 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/edbjr2p1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=edbjr2p1.example.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "PROD1" has 1 instance(s).
Instance "PROD1", status UNKNOWN, has 1 handler(s) for this service...
Service "PROD1.us.oracle.com" has 1 instance(s).
Instance "PROD1", status READY, has 1 handler(s) for this service...
Service "PROD1XDB.us.oracle.com" has 1 instance(s).
Instance "PROD1", status READY, has 1 handler(s) for this service...
Service "plsextproc" has 1 instance(s).
Instance "plsextproc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
03
数领先机 智赢未来
DTCC2018
中国数据库技术大会(简称 DTCC)是国内数据库及大数据领域规模最大、最受欢迎的技术交流盛会,每年一届。自 2010 年以来,迄今已成功举办了八届,累计参与人次达到 20000+。DTCC 每年都将邀请百余位行业专家,就热点技术话题进行分享,为数据库人群、大数据从业人员、广大互联网人士及行业相关人士提供最具价值的交流平台。
2018 年 5 月 10-12 日,第九届中国数据库技术大会(DTCC2018)将如约而至。本届大会以 “数领先机 • 智赢未来” 为主题,设定 2 大主会场及 20 个技术专场,邀请来自国内外互联网、金融、教育等行业百余位技术专家,共同探讨 Oracle、MySQL、NoSQL、大数据、机器学习、区块链、数据可视化等领域的前瞻性热点话题与技术。
点击左下阅读原文,立享购票7.8折优惠
以上是关于Oracle 监听之动态和静态注册的主要内容,如果未能解决你的问题,请参考以下文章