This is the 16th day of my participation in the August More Text Challenge

1. Phenomenon:

  1. The client attempts to connect to the database slowly or times out. Procedure
  2. Running the LSNRCTL status command to check the listening status of the database server is slow or blocked.
  3. No error is recorded in the database log.

2. Reasons:

In this case, the size of database listening log listener.log exceeds the limit. This problem usually occurs in Windows operating system. When Windows uses the FAT32 file system, the maximum single file size is 4GB. When Linux uses the ext2 file system, the maximum size of a single file is 1TB. When Linux uses the ext3 file system, the maximum size of a single file is 2TB. Although the operating system file size limit is not large, the monitoring log is too large, but still affect the database connection. You are advised to periodically monitor and clear the size of listening logs and ensure that the size does not exceed 2GB.

3. Solutions:

Windows

1. Check the size of listening logs

Listen to the log directory, Oracle software installation directory Find the app folder and search as follows: D: app\Administrator\diag\ TNSLSNR \ host name \listener\trace or DOS command (CMD window) run LSNRCTL status check, go to listener\trace:

2. Clear listening logs

Switch the Dos window to the directory where the listening log resides:

Back up the original listener log and generate a new listener log:

LSNRCTL set log_status off -- Rename the log file. Generally, add the date to the log file. If the OS has no space, you can delete the log file when you determine that the listening log file is no longer used. Log listener.old.20200706 -- Rename listener.log listener.old.20200706 -- Rename listener.log listener.old.20200706 -- rename listener.log listener.old.20200706 -- LSNRCTL set log_status on LSNRCTL set log_status onCopy the code

Linux

1. Check the size of listening logs

Listen to the log directory, Oracle software installation directory Find the app folder and search as follows: / u01 / app/oracle/diag TNSLSNR/host name/listener/trace or oracle users run the LSNRCTL status command to see, to the listener/trace:

Switch to the directory where the listening log resides and run the du -sh * command to check the file size:

2. Clear listening logs

Run the following command in the listening log directory to back up original listening logs and generate new listening logs:

LSNRCTL set log_status off -- Rename the log file. Generally, add the date to the log file. If the OS has no space, you can delete the log file when you determine that the listening log file is no longer used. Mv listener.log listener.old.20200706 -- A new log file LSNRCTL set log_status on is automatically createdCopy the code