如果連接時候變得較慢 查看Oracle日志記錄,可能是因為此文件太大,超過2G,
需要定期清理,(如果多用戶,記得用root,可能沒權限)
查看listener.log?
find / -name listener.log
經查看,竟然高達2G得日志數據,由于一些老舊的OS不支持2GB以上的文件,故當listener.log文件
超過2GB時,會出現無法處理新的連接,新的操作系統雖然不會出現這個問題,但我們依然需要對其
進行定期處理清理。
Listener log日志文件處理
[oracle@localhost home]$ lsnrctlLSNRCTL> set log_status offConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))LISTENER parameter "log_status" set to OFFThe command completed successfullyLSNRCTL> show log_statusConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))LISTENER parameter "log_status" set to OFFThe command completed successfullyLSNRCTL> exit[oracle@localhost home]$ find -name listener.loghome/oracle/app/oracle/diag/tnslsnr/localhost/listener/trace/listener.log[oracle@localhost ~]$ cd /home/oracle/app/oracle/diag/tnslsnr/localhost/listener/trace/[oracle@localhost trace]$ mv listener.log listener.log.20191127[oracle@localhost trace]$ lslistener.log.20191127 ora_2617_140154513196800.trc[oracle@localhost trace]$ lsnrctlLSNRCTL> set log_status onConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))LISTENER parameter "log_status" set to ONThe command completed successfullyLSNRCTL> show log_status Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))LISTENER parameter "log_status" set to ONThe command completed successfullyLSNRCTL> reloadConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))The command completed successfullyLSNRCTL> exit[oracle@localhost trace]$
[oracle@localhost home]$ lsnrctlLSNRCTL> set log_status offLSNRCTL> show log_statusLSNRCTL> exit[oracle@localhost home]$ find -name listener.log[oracle@localhost trace]$ mv listener.log listener.log.20191127LSNRCTL> set log_status onLSNRCTL> reload
我們通過重命名日志文件之后,會自動生成一個新的listener.log文件。當然也可以進行清空處理,可以先copy一下備份,然后進行清空處理。
總結
以上所述是小編給大家介紹的處理Oracle 監聽文件listener.log問題,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對武林網網站的支持!
如果你覺得本文對你有幫助,歡迎轉載,煩請注明出處,謝謝!
新聞熱點
疑難解答