Oracle snooping logs are cleaned regularly
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!