当前位置: 代码网 > it编程>数据库>Oracle > Oracle 12.2处理sysaux空间占满问题

Oracle 12.2处理sysaux空间占满问题

2024年05月18日 Oracle 我要评论
基本环境数据库:oracle 12.2 rac操作系统:unix&solaris 11.3报错现像今天处理别的问题查看告警日志偶然发现大量的报错,无法扩展sysaux表空间于是登录系统,查看系

基本环境

数据库:oracle 12.2 rac

操作系统:unix&solaris 11.3

报错现像

今天处理别的问题查看告警日志偶然发现大量的报错,无法扩展sysaux表空间

image.png

于是登录系统,查看系统表空间使用情况,发现sysaux表空间用满了

image.png

查看sysaux表空间情况

使用sql检查一下占用,

select occupant_name"item",round(space_usage_kbytes/1024/1024,3)"space used (gb)",schema_name "schema",move_procedure "moveprocedure"
from v$sysaux_occupants
order by 2 desc;

返回如下:

image.png

再检查segment_names查看

select * from (
select segment_name,sum(bytes)/1024/1024 total_mb,tablespace_name from dba_segments where tablespace_name in
('system','sysaux') group by segment_name,tablespace_name order by 2 desc)
where rownum <=20;

返回如下:

image.png

释放表空间aud$unified

需要用到dbms包来处理

begin
dbms_audit_mgmt.clean_audit_trail(
audit_trail_type => dbms_audit_mgmt.audit_trail_unified,
container => dbms_audit_mgmt.container_current,
use_last_arch_timestamp => false);
end;
/

use_last_arch_timestamp这个地方有两个选项:

  • use_last_arch_timestamp: enter either of the following settings:
    • true: deletes audit records created before the last archive timestamp. to set the archive timestamp, see step 3: optionally, set an archive timestamp for audit records. the default (and recommended) value is . oracle recommends that you set to . trueuse_last_arch_timestamptrue
    • false: deletes all audit records without considering last archive timestamp. be careful about using this setting, in case you inadvertently delete audit records that should not have been deleted.

处理完再次查看

image.png

清理之后会留下清理记录,可通过sql查看

select * from unified_audit_trail where object_name='dbms_audit_mgmt' and object_schema='sys' and sql_text like '%dbms_audit_mgmt.clean_audit_trail%';

到此这篇关于oracle 12.2处理sysaux空间占满问题的文章就介绍到这了,更多相关oracle sysaux空间占满内容请搜索代码网以前的文章或继续浏览下面的相关文章希望大家以后多多支持代码网!

(0)

相关文章:

版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。 如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。

发表评论

验证码:
Copyright © 2017-2025  代码网 保留所有权利. 粤ICP备2024248653号
站长QQ:2386932994 | 联系邮箱:2386932994@qq.com