接上文(Oracle sysaux表空间使用过大处理-1https://www.l9ll.cn/database/501.html )介绍另一种处理方法:
基本情况如下:
sysaux空间使用很大,检查相关对象,和awr设置

发现dbid=3737847129不是当前数据库,并且sysaux使用对象如下:

top segment对象发现分区表,都是属于dbid:3737847129的awr资料库数据。以WRH$_EVENT_HISTOGRAM,发现其分区键是dbid、snap-id进行分区的,因此可以考虑通过分区表的相关操作来解决。
分区裁剪:
alter table WRH$_EVENT_HISTOGRAM drop partition WRH$_EVENT_HISTOGRAM __3737847129_0 update indexes;
然后检查索引是否失效,如果失效需要重建索引。
进行构建分区裁剪脚本:

脚本如下:

然后检查索引状态:
select index_name,table_name,status from user_indexes where status != ‘VALID’;
select index_name,partition_name,status from user_ind_partitions where status = ‘UNUSABLE’;
如果有分区索引失效,则重建。
完成数据清理。
–the end.