
Deleting Log, Directory, Audit, and Trace Files
Use
It is important that you regularly delete old log, directory, audit and trace files, particularly those which were created by the database system.
If the log file directory for the database ALERT and trace files fills up, the database system issues error messages that can be hard to analyze. To free more space, be sure to regularly delete the operating system audit trail.
Prerequisites
Log and Trace Files
SAPDBA enables you to delete the following types of log and trace files:

SAPDBA logs and associated directories for which the action is marked as an error in the main log are not deleted from SAPDBA.

The deletion of BRBACKUP/BRARCHIVE logs means that the information for the corresponding backups in the Computing Center Management System (CCMS) can no longer be displayed.
Note that, if a backup for which the corresponding log has been deleted needs to be restored with SAPDBA, you must first restore the log.
Always make sure that there is a sufficiently large number of logs present. The SAPDBA recommended value is to only delete logs older than 30 days.
If you do not explicitly specify the number of days until deletion of the logs or directories, the default values from the profile
init<DBSID>.dba are used. For more information, see Sample Initialization Profile.ALERT File
The ALERT file (
alert_<DBSID>.log ) of the database system is stored in directory <SAPDATA_HOME>/saptrace/background . Database activities are logged continuously in this file. If database problems occur, you can use this file to find out what happened. The ALERT file contains very important information, so SAPDBA does not provide an option for deleting this file.Audit Logs
Audit logs contain information about the inspected database action, the user who performed the operation, and the date and time of the operation. Audit logs can be saved in the operating system audit trail (
<ORACLE_HOME>/rdbms/audit ). Even when no explicit auditing is active, Oracle writes an auditing log for every logon to the database. As a result, the directory can grow very quickly. Be sure to regularly delete the old audit logs.Procedure
For more information, see
Initialization Profile init<DBSID>.dba.sapdba -cleanup
SAPDBA removes objects that are older than the specified interval (in days) according to the defaults set in the initialization profile
init<DBSID>.dba .