Record three times because of the Oracle log caused database problems and solutions

Oracle version 11G

1、E:\app\Administrator\diag\rdbms\orcl\orcl\trace

A large number of files are generated under this path, and some files reach the upper limit of 4G in Windows, so manually delete them, and some files exceeding 4G cannot be deleted

Solution:

Create a scheduled task to delete files from one day ago

forfiles /p "E:\app\Administrator\diag\rdbms\orcl\orcl\trace" /s /m *.* /d -1 /c "cmd /c del @path"

2. oracle listener.log log

What are the problems caused by the Oracle listening log file (listener.log) becoming too large?

There are mainly two aspects:

First: Unable to connect to
the listener. The log size cannot exceed 2GB. If it exceeds 2GB, the listener will not be able to handle new connections, and the system will not be able to connect to the database. For example, tomcat cannot be started, and it will report that the connection to the database has timed out.

There is no problem with the database itself. You can log in and query through sqlplus, but after the program is disconnected, the connection will time out again. Use PLSQL Developer to connect to the database server and prompt ORA-12514: The TNS listener is currently unrecognized

Second: Performance degradation
The listening log file (listener.log) becomes too large, causing some performance problems for writing and viewing. When the log is too large, if you need to view the log, it is too slow to open the log.

Solution 

Close the monitoring log, the operation is as follows, no need to restart

C:\Users\Administrator>lsnrctl
LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 13-MAR-2015 16:27
:09
Copyright (c) 1991, 2010, Oracle.  All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> set log_status off
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
LISTENER parameter "log_status" set to OFF
The command completed successfully
LSNRCTL> save_config
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
Saved LISTENER configuration parameters.
Listener Parameter File   D:\oracle\product\11.2.0\dbhome_1\network\admin\listen
er.ora
Old Parameter File   D:\oracle\product\11.2.0\dbhome_1\network\admin\listener.ba
k
The command completed successfully
LSNRCTL>

 

E:\app\Administrator\product\11.2.0\dbhome_1\oc4j\j2ee\OC4J_DBConsole_iZ25dp3clteZ_orcl\log\em-application.log

em-application.log

I don’t know what impact it will cause, and the log volume has reached 7.6G, exceeding the upper limit of Windows 4G. However, the corresponding service OracleDBConsoleorcl cannot be restarted. It cannot be started after it is closed, and the server can only be restarted.

When deleting this file, it prompts that java.exe is occupied. If you end java.exe from the process, you can delete this file. I don’t know if you need to restart the OracleDBConsoleorcl service. I restarted it, and it can be restarted successfully.

 

 

Guess you like

Origin blog.csdn.net/zkcharge/article/details/115297193