Problem solve Get help with specific problems with your technologies, process and projects.

Do you have audit files?

Automatic audit files for Oracle on Unix platforms steal disk space.

Many beginning DBAs do not realize that they have audit files for Oracle on Unix platforms. I had been a DBA for almost two years when this fact was pointed out to me. I didn't realize that these files were being generated automatically for me and that over time, they were stealing precious disk space from me.

Even if you have not set up any auditing, the Oracle RDBMS still audits certain tasks on its own. Oracle audits any connection to the database as SYSDBA, SYSOPER, or INTERNAL. You can find these audit files in $ORACLE_HOME/rdbms/audit and they have a ".aud" extension. These audit files are not very big. On one of my systems, these audit files range from 500 to 1100 bytes each. Granted, these are not very big files, but over time, they can take up disk resources. Feel free to poke around in these files.

So I now delete old audit files on a regular basis. To find these audit files and delete them, you can use the following command:

   find $ORACLE_HOME/rdbms/audit/*.aud -mtime +30 -exec rm -f {} \;

This command will find all audit files over 30 days old and delete them. How long you keep your audit files is up to you. Since I hate performing repetitive tasks manually, I schedule this command in cron to run once a week.

Time to go out and hunt down those pesky audit files!

For More Information

Dig Deeper on Oracle database security