The Oracle listener log file is a continuously increasing plain text file. It usually checks whether the listener has an abnormal stop or malicious attack connection.
When this file is very large, it may be slow to open and browse the file content. In this case, you may want to back up the current log file and create a new log file. However, the Oracle listener cannot delete or rename its log files at runtime. Therefore, only the Oracle listener is stopped, and then the Oracle listener is started, A new listener log file will be automatically created at startup, but the client connection will be disconnected. This article introduces a way to rename the Oracle listener log file without stopping the listener.
On Windows:
- C :\>Cd \ oracle \ ora92 \ network \ log # Switch to the directory where the listener log file is located
- C: \ oracle \ ora92 \ network \ log>Lsnrctl set log_status off # temporarily offline the listener Log File
- C: \ oracle \ ora92 \ network \ log>Rename listener. log listener. old # rename the log file and add the date
- C: \ oracle \ ora92 \ network \ log>Lsnrctl set log_status on # Bring the listener log file online and a new log file will be created automatically.
-
On Linux/Unix platforms:
- % cd /u01/app/oracle/product/9.2.0/network/log
- % lsnrctl set log_status off
- % mv listener.log listener.old
- % lsnrctl set log_status on
-
After the name is renamed, you can copy listener. old to the DBA's work computer for in-depth analysis. In case of hacker attacks, you can also retain the file as evidence.
- Code required to modify the Oracle Stored Procedure
- Summary of Oracle stored procedures
- Code for implementing the Oracle Stored Procedure
- In-depth high-performance dynamic Oracle SQL Development
- Analysis of Oracle SQL optimization rules