1、查看当前审计数据大小:
select segment_name, bytes/1024/1024/1024 as SIZE_GB from dba_segments where segment_name = 'AUD$';
SEGMENT_NAME SIZE_GB
------------------------------ ----------
AUD$ .000061035
2、查看审计表总行数:
select count(*) from sys.aud$;
COUNT(*)
----------
10
3、创建清理sys.aud$表的存储过程procedure:
SQL> create or replace procedure del_aud
2 as
3 begin
4 delete from sys.aud$ where ntimestamp#<=sysdate-1;
5 commit;
6 end;
7 /