ITPub博客

首页 > 数据库 > Oracle > 审计表 aud$ 清理

审计表 aud$ 清理

原创 Oracle 作者:哎呀我的天呐 时间:2019-03-04 09:39:12 1 删除 编辑
SELECT D.TABLESPACE_NAME,
       SPACE || 'M' "SUM_SPACE(M)",
       BLOCKS "SUM_BLOCKS",
       SPACE - NVL (FREE_SPACE, 0) || 'M' "USED_SPACE(M)",
       ROUND ( (1 - NVL (FREE_SPACE, 0) / SPACE) * 100, 2) || '%'
          "USED_RATE(%)",
       FREE_SPACE || 'M' "FREE_SPACE(M)"
  FROM (  SELECT TABLESPACE_NAME,
                 ROUND (SUM (BYTES) / (1024 * 1024), 2) SPACE,
                 SUM (BLOCKS) BLOCKS
            FROM DBA_DATA_FILES
        GROUP BY TABLESPACE_NAME) D,
       (  SELECT TABLESPACE_NAME,
                 ROUND (SUM (BYTES) / (1024 * 1024), 2) FREE_SPACE
            FROM DBA_FREE_SPACE
        GROUP BY TABLESPACE_NAME) F
 WHERE D.TABLESPACE_NAME = F.TABLESPACE_NAME(+)
  AND D.TABLESPACE_NAME = 'SYSTEM';


4G


exp \'/ as sysdba\' file=/home/oracle/aud.dmp log=/home/oracle/aud.log tables=sys.aud$
Export: Release 11.2.0.4.0 - Production on Mon Mar 4 09:28:15 2019
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Tes
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set
About to export specified tables via Conventional Path ...
. . exporting table                           AUD$
   28396912 rows exported
Export terminated successfully without warnings.
truncate table sys.aud$;


DBA_AUDIT_SESSION

显示所有关于会话登陆登出的审计记录
noaudit create session; --执行    (与 noaudit session;是一样的) 
SELECT count(*) FROM dba_audit_session WHERE action_name = 'LOGON'; 变不记录了



来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29990276/viewspace-2637459/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
https://cloud.tencent.com/developer/inventory/14362

注册时间:2014-10-30

  • 博文量
    403
  • 访问量
    2528828