Oracle database audit file housekeeping methods – adump purge

oracle audit trace file housekeeping

For Oracle database,SYS, SYSDBA or SYSOPER connections to the Oracle database are always audited. Sometimes this can lead to the creation of an excessive number of audit files.
When this is considered to be a problem it cannot be solved at the database side and it must be investigated why the ‘client’ applications including Oracle Enterprise Manager (OEM) Components and agents are connecting so frequently as SYSDBA/SYSOPER. So this type of auditing mandatory in the Oracle database and can NOT be turned off.
However the amount of audited information depends on AUDIT_SYS_OPERATIONS parameter that allows the addition audit of all statements issued by SYS/SYSDBA/SYSOPER in the same OS audit trail file.
In case the parameter AUDIT_SYS_OPERATIONS=TRUE Oracle audits not only SYS/SYSDBA/SYSOPER connection details but also their SQL operations. In any case the audit files with the name like sid_ora__instance#.aud are created in audit_file_dest location on Unix or linux.

sql*plus> show parameter audit
 NAME                                 TYPE        VALUE
 ------------------------------------ ----------- ------------------------------
 audit_file_dest                      string      /opt/app/oracle/admin/orcl/ adump
 audit_sys_operations                 boolean     FALSE


See below one of the methods of purging those audit files on Unix using a simple Unix command based on foll– Deletion of files older than 40 days

Default System Audit files location: $ORACLE_BASE/admin//adump/.trc files can be purged by adrci command

$ find /u01/app/oracle/SID/adump/ -name '*.aud' -mtime +40 -exec rm -f {} \;

注:查找的对象必须要 在单引号引用,否则会出现如下报错:
-bash: /usr/bin/find: Argument list too long

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值