审计表 aud$ 清理


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博客 ” ,链接:http://blog.itpub.net/29990276/viewspace-2637459/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29990276/viewspace-2637459/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值