oracle 10Grac不生成监听日志
环境:oracle 10.2.0.5.0
一 首先查看监听状态:
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xx)(PORT=1521)(IP=FIRST)))
STATUS of the LISTENER
------------------------
Alias LISTENER_xxxxxx1
Version TNSLSNR for Linux: Version 10.2.0.5.0 - Production
Start Date 14-OCT-2022 09:33:50
Uptime 263 days 0 hr. 38 min. 37 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/app/oracle/product/10.2.0/network/admin/listener.ora
Listener Log File /oracle/app/oracle/product/10.2.0/network/log/listener_xxxxxx1.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xx)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xx)(PORT=1521)))
Services Summary...
Service " ASM" has 1 instance(s).
Instance " ASM1", status BLOCKED, has 1 handler(s) for this service...
Service " ASM_XPT" has 1 instance(s).
Instance " ASM1", status BLOCKED, has 1 handler(s) for this service...
Service "xx" has 2 instance(s).
Instance "xx", status READY, has 2 handler(s) for this service...
Instance "xx", status READY, has 1 handler(s) for this service...
The command completed successfully
监听状态正常。
二 查看是否禁止生成监听日志:
有两种禁止生成监听日志的方法:
1 log_status设为off
查看log_status是否为off
LSNRCTL> show log_status
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
LISTENER parameter "log_status" set to ON
2 listener.ora 添加LOGGING_LISTENER=OFF
cat listener.ora也没有设置LOGGING_LISTENER=OFF
通过操作系统看listener.log时候发现有两个log,可能数据添加了多个监听
通过lsnrctl status 看到使用的监听为LISTENER_xxxxxx1
再来查看current_listener参数设置的监听
LSNRCTL> show current_listener
Current Listener is LISTENER
修改current_listener=LISTENER_xxxxxx1
(直接修改set current_listener LISTENER_xxxxxx1不会生效,需要先set log_status off,亲测,但不知道原理)
LSNRCTL> set log_status off
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
LISTENER parameter "log_status" set to OFF
The command completed successfully
LSNRCTL> set current_listener LISTENER_xxxxxx1
Current Listener is LISTENER_xxxxxx2
LSNRCTL> set log_status on
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xx)(PORT=1521)(IP=FIRST)))
LISTENER_ZXYYDB2 parameter "log_status" set to ON
The command completed successfully
LSNRCTL> show log_status
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
LISTENER parameter "log_status" set to ON
监听日志已经有了新的日志。