hussainkhan22
asked on
purge audit files
hey how do we purge the older audit files and placed in crontab.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If your Oracle version is 11g, find+rm is useless because Oracle will re-create the trace files again if you remove them due to these files actually residing in the Automatic Diagnostic Repository .
You need to either: a) remove them with the 'adrci' utility or b) manually through EM or Grid Control.
You need to either: a) remove them with the 'adrci' utility or b) manually through EM or Grid Control.
The question is about audit files, not trace files.
Ooops, yes...
Audit files you need to manually remove as johnsone suggest.
Audit files you need to manually remove as johnsone suggest.
Man page for find
Look at the mtime and exec parameters.
You are going to want to hard code the directory to look at as your profile is not run as part of a cron job.
If you write a script and set up the environment in the script then use the find command, you can then schedule the job via cron. This method allows you to do multiple cleanups with one cron job.