Wednesday 25 November 2009

Rotate Oracle Application Server logs

How to rotate Oracle Application Server logs

We are using the Oracle10g Application Server version 10.1.2.2.0. As the logfiles generated on OAS are occupying the space some times we need to stop the OAS to clear the log files. Alternatively we can set the parameters on the OAS config to rotate the log files.

We can achieve the log rotation using Oracle Diagnostic Logging (ODL). Follow the below steps to rotate the logs.

1. Go to the $ORACLE_HOME/j2ee/oc4j_bi_forms/config
2. Take a backup of the application.xml file.
3. Find the below lines on the application.xml file.



and change it to



Note: specify the max-file-size and max-directory-size values appropriately.

4. Take a backup of the j2ee-logging.xml file in the same directory
5. Add the below code into the log loader



No comments: