IT俱乐部 Oracle Oracle 12.2处理sysaux空间占满问题

Oracle 12.2处理sysaux空间占满问题

基本环境

数据库:oracle 12.2 RAC

操作系统:unix&solaris 11.3

报错现像

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

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

查看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;

返回如下:

再检查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 

返回如下:

释放表空间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.

处理完再次查看

清理之后会留下清理记录,可通过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空间占满内容请搜索IT俱乐部以前的文章或继续浏览下面的相关文章希望大家以后多多支持IT俱乐部!

本文收集自网络,不代表IT俱乐部立场,转载请注明出处。https://www.2it.club/database/oracle/9886.html
上一篇
下一篇
联系我们

联系我们

在线咨询: QQ交谈

邮箱: 1120393934@qq.com

工作时间:周一至周五,9:00-17:30,节假日休息

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

返回顶部