您好,登錄后才能下訂單哦!
OS : Windows Server 2008 32Bit
DB : 11.2.0
前天應(yīng)用不能訪問數(shù)據(jù)庫了 (后臺(tái)應(yīng)用能訪問數(shù)據(jù)庫),故障發(fā)生。
馬上登錄到服務(wù)器里查看監(jiān)聽狀態(tài),發(fā)現(xiàn)有TNS-12541 ,TNS-12560等錯(cuò)誤
手動(dòng)把監(jiān)聽服務(wù)啟動(dòng),這時(shí)候服務(wù)狀態(tài)上顯示為已啟動(dòng),但在CMD窗口執(zhí)行l(wèi)snrctl status的時(shí)候依然返回錯(cuò)誤信息:
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: 無監(jiān)聽程序
TNS-12560: TNS: 協(xié)議適配器錯(cuò)誤
TNS-00511: 無監(jiān)聽程序
32-bit Windows Error: 61: Unknown error
正在連接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
過段時(shí)間回顯非常慢。
**網(wǎng)上有個(gè)解決TNS-12535錯(cuò)誤的案例,平臺(tái)和版本都很類似,如下:
DIAG_ADR_ENABLED = OFF
DIAG_ADR_ENABLED_<listenername> = OFF
如果監(jiān)聽是listener時(shí),則前面的名稱為:DIAG_ADR_ENABLED_LISTENER = OFF
但這并不是問題發(fā)生原因,在繼續(xù)排查過程中偶然發(fā)現(xiàn)監(jiān)聽日志大小居然為4G。
Oracle一個(gè)BUG,BUG號(hào)為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進(jìn)入交互模式
2)set log_file mylog
3)執(zhí)行set current_listener LISTENER
4)set log_status off
5)save_config
6)stop 停止監(jiān)聽器
7)手工刪除ADR指定的監(jiān)聽日志路徑下的listener.log文件
8)start重啟監(jiān)聽器
9)status查看狀態(tài)
到此問題解決。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。