ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

11g修改listner ADR

2019-07-25 13:56:04  阅读:263  来源: 互联网

标签:listner LISTENER 11g ADR app listener ADDRESS oracle PROTOCOL


修改listner ADR 有2种方法:
一、禁用ADR,在lsnrctl 命令下修改log_directory的值,这也是网上大多数的修改方式。
su - grid
cd $ORACLE_HOME/netwrok/admin
vi listener.ora
DIAG_ADR_ENABLED_LISTENER=OFF --->禁用ADR
修改好后,需要reload。
[oracle:/oracle/app/product/grid/network/admin:RACTEST1] lsnrctl

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 25-JUL-2019 13:08:48

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

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> show
The following operations are available after show
An asterisk (*) denotes a modifier or extended command:

rawmode displaymode
rules trc_file
trc_directory trc_level
log_file log_directory
log_status current_listener
inbound_connect_timeout startup_waittime
snmp_visible save_config_on_stop
dynamic_registration enable_global_dynamic_endpoint
oracle_home pid

LSNRCTL> show log_directory
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.26.205.152)(PORT=1521)))
LISTENER parameter "log_directory" set to /oracle/app/oracle/diag/tnslsnr/ractest1/listener/alert/
The command completed successfully
LSNRCTL> set log_directory /home/oracle/app/oracle/diag/tnslsnr/ractest1/listener/alert/
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.26.205.152)(PORT=1521)))
LISTENER parameter "log_directory" set to /home/oracle/app/oracle/diag/tnslsnr/ractest1/listener/alert/
The command completed successfully
LSNRCTL> save_config
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.26.205.152)(PORT=1521)))
Saved LISTENER configuration parameters.
Listener Parameter File /oracle/app/product/grid/network/admin/listener.ora
Old Parameter File /oracle/app/product/grid/network/admin/listener.bak
The command completed successfully
LSNRCTL> exit
[oracle:/oracle/app/product/grid/network/admin:RACTEST1] lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 25-JUL-2019 13:09:31

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.26.205.152)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 25-JUL-2019 11:57:04
Uptime 0 days 1 hr. 12 min. 26 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/app/product/grid/network/admin/listener.ora
Listener Log File /home/oracle/app/oracle/diag/tnslsnr/ractest1/listener/alert/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.26.205.152)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.26.205.153)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "RACTEST" has 1 instance(s).
Instance "RACTEST1", status READY, has 1 handler(s) for this service...
The command completed successfully
可以看到已经修改成功。

二、开启ADR时,修改目录。
vi listener.ora
ADR_BASE_LISTENER = /oracle/app/oracle ---->加入这个参数
修改后,需要重启监听程序。
[oracle:/oracle/app/product/grid/network/admin:RACTEST1] cat listener.ora
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
DIAG_ADR_ENABLED_LISTENER=on
ADR_BASE_LISTENER = /oracle/app/oracle
#----ADDED BY TNSLSNR 24-JUL-2019 10:27:25---
#LOG_DIRECTORY_LISTENER = /home/oracle/app/oracle/diag/tnslsnr/ractest1/listener/alert/
#--------------------------------------------

[oracle:/oracle/app/product/grid/network/admin:RACTEST1] srvctl start listener -n ractest1
[oracle:/oracle/app/product/grid/network/admin:RACTEST1] lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 25-JUL-2019 13:21:22

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.26.205.152)(PORT=1521)))
STATUS of the LISTENER

Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 25-JUL-2019 13:21:18
Uptime 0 days 0 hr. 0 min. 3 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/app/product/grid/network/admin/listener.ora
Listener Log File /oracle/app/oracle/diag/tnslsnr/ractest1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.26.205.152)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.26.205.153)(PORT=1521)))
The listener supports no services
The command completed successfully

标签:listner,LISTENER,11g,ADR,app,listener,ADDRESS,oracle,PROTOCOL
来源: https://blog.51cto.com/214320/2423428

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有