前几天,帮客户巡检一套oracle数据库时,发现监听大小的日志为0
[oracle@p595a1:/oracle/app/oracle/product/10.2.0/db_1/network/log]$ls -ltr
total 2402056
-rw-r----- 1 oracle oinstall 0 Oct 25 11:10 listener_p595a1.log
-rw-r----- 1 oracle oinstall 1612199 Nov 08 10:12 sqlnet.log
sqlplus
这样测试登录时,监听日志也是没有写入
通过以下方法解决:
LSNRCTL> show log_status
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
LISTENER parameter "log_status" set to OFF ---因为这个设置停止监听写入功能
The command completed successfully
LSNRCTL> set log_status on
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
LISTENER parameter "log_status" set to ON ---打开监听写入功能
The command completed successfully
再查看日志,里面有内容写入
[oracle@p595a1:/oracle/app/oracle/product/10.2.0/db_1/network/log]$ls -ltr
total 2402064
-rw-r----- 1 oracle oinstall 1612199 Nov 08 10:12 sqlnet.log
-rw-r----- 1 oracle oinstall 97 Nov 10 13:38 listener_p595a1.log