Do you have audit files?

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

    Requires Free Membership to View

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

This was first published in May 2001

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.