Get the App
SLTechnology News&Howtos  ›  Database  › 

Oracle snooping logs are cleaned regularly

Shulou Source: shulou.com Published: 2022-06-01 02:59:47 10月04日 Update

Environment:

Oracle 11.2.0

Win Server 2008 R2 Enterprise

Reason: Oracle snooping log file size exceeds 4G Oracle snooping connection intermittently

Solution: re-establish a new log file and execute it regularly through scheduled tasks. For convenience, I execute it here once a day.

The batch file is as follows:

@ echo off

Rem needs to clean up regularly because the database listening log is too large, which affects the use of oracle.

Rem stops listening to write logs

Lsnrctl set log_status off

Rem modifies the name of the listening log file and executes it once a day

Ren E:\ app\ Administrator\ diag\ tnslsnr\% your own computer name%\ listener\ trace\ listener.log listener.log.%date:~0,4%%date:~5,2%%date:~8,2%

Rem restarts snooping log

Lsnrctl set log_status on

Rem reload monitoring, for insurance, found that it can be used normally without loading

Lsnrctl reload

Summary

The above is the regular cleaning of the Oracle monitoring log introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply you in time. Thank you very much for your support to the website!

Tags: Log monitor file intermittent task content method reason name size data database file name environment question website computer new help influence Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Huawei Microsoft Shulou Tech Info Xiaomi