OS : Windows Server 2008 32Bit
DB : 11.2.0
前天应用不能访问数据库了 (后台应用能访问数据库),故障发生。
马上登录到服务器里查看监听状态,发现有TNS-12541 ,TNS-12560等错误
手动把监听服务启动,这时候服务状态上显示为已启动,但在CMD窗口执行lsnrctl status的时候依然返回错误信息:
C:\>lsnrctl status
LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 13-2月 -2018 10:39:47
Copyright (c) 1991, 2010, Oracle. All rights reserved.
正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=john-PC)(PORT=
TNS-12541: TNS: 无监听程序
TNS-12560: TNS: 协议适配器错误
TNS-00511: 无监听程序
32-bit Windows Error: 61: Unknown error
正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
过段时间回显非常慢。
**网上有个解决TNS-12535错误的案例,平台和版本都很类似,如下:
DIAG_ADR_ENABLED = OFF
DIAG_ADR_ENABLED_<listenername> = OFF
如果监听是listener时,则前面的名称为:DIAG_ADR_ENABLED_LISTENER = OFF
但这并不是问题发生原因,在继续排查过程中偶然发现监听日志大小居然为4G。
Oracle一个BUG,BUG号为9879101 : THE CONNECT THROUGH LISTENER WAS SLOW WHEN LISTNER LOG GROWED 4GB。
有MOS上一篇文章,ID 1319797.1 : WINDOWS: Listener Hangs & Lsnrctl Commands Are Slow or Hang,里面给出了解决方法:
You can solve this problem by deleting the large listener in $ORACLE_BASE\diag\tnslsnr\<hostname>\listener\trace\<listener_name>.log
1) Stop the listener process using the command line or Control Panel Service.
2) Delete the log file(s) that are at or approaching the 4G size limit at this location:
$ORACLE_BASE\diag\tnslsnr\<hostname>\listener\trace\<listener_name>.log
3) Issue any lsnrctl command and you will see a new listener.log in its place under:
$ORACLE_BASE\diag\tnslsnr\<hostname>\listener\trace\
Since ADR Diagnostics are enabled for this listener these steps cannot be done dynamically using the lsnrctl utility.
e.g.
LSNRCTL>set log_file mylog
Will yield: TNS-01251: Cannot set trace/log directory under ADR.
However, it is possible to disable the flat file listener logging using the following commands:
LSNRCTL>set current_listener <listener_name>
LSNRCTL>set log_status OFF
LSNRCTL>save_config
1)LSNRCTL进入交互模式
2)set log_file mylog
3)执行set current_listener LISTENER
4)set log_status off
5)save_config
6)stop 停止监听器
7)手工删除ADR指定的监听日志路径下的listener.log文件
8)start重启监听器
9)status查看状态
到此问题解决。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。