Table AUD$
| How to Truncate, Delete, or Purge Rows from the Audit Trail Table AUD$ | 转到底部 |
![]() |

PURPOSEThis document explains how to purge, truncate, or delete rows from the audit trail table SYS.AUD$. Starting with Oracle 11gR2 it is possible to use package DBMS_AUDIT_MGMT for this. More information about this package can be read in Note 731908.1 -New Feature DBMS_AUDIT_MGMT To Manage And Purge Audit Information.
SCOPEThis document is intended for DBA's or Oracle Support Analysts. DETAILSTo delete rows from the database audit trail table, an appropriate privilege is required. You must either be the user SYS, or a user with DELETE ANY TABLE system privilege, or a user to whom SYS has granted the object privilege DELETE on SYS.AUD$. 1) To purge all the audit records from the audit trail run this command: SQL> truncate table aud$;
2)To delete rows from the audit trail related to a particular audited object run this command: SQL> DELETE FROM sys.aud$ WHERE obj$name='<object_name>';
Note: The above operations must be performed as an user who is granted the delete_catalog_role role or by SYS. If OLS is being installed then the delete_catalog_role might lose the delete privilege on table aud$ because of bug 9697811 which is fixed by patchset 11.2.0.2. To remedy this problem one can run the following statement as SYS:
grant delete on sys.aud$ to delete_catalog_role; 3) If the audit trail information must be archived, copy the relevant rows to another table, then truncate the aud$ table and finally you can optionally export the backup table(backup_aud$) to an OS file and then drop the backup table : SQL> CREATE TABLE backup_aud$ AS SELECT * from sys.aud$;
SQL> truncate table aud$;
export table backup_aud$: [oracle@seclin4 ~]$ exp file=aud_backup.dmp tables=backup_aud$
Export: Release 11.2.0.3.0 - Production on Tue Jun 25 10:53:06 2013 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. Username: / as sysdba Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production About to export specified tables via Conventional Path ... SQL> drop table backup_aud$;
4) If your intention is to reduce the space occupied by the aud$ table you can perform the actions from 3) and at the end reload the data back to aud$: SQL>insert into aud$ select * from backup_aud$;
SQL>commit; CAUTION: SYS.AUD$ is the only SYS object that should ever be directly modified
Note: The DELETE ANY TABLE privilege only applies to SYS objects if O7_DICTIONARY_ACCESSIBILITY=TRUE
|
Table AUD$的更多相关文章
- ORA-1653: unable to extend table SYS.AUD$
今早运维组的同事反映有个系统功能很多地方都报错,怀疑是不是数据库有什么问题.于是登录数据库检查,通过crsctl status res -t检查,发现所有集群资源都是OK的,没有哪个资源挂掉了.于是到 ...
- ora-01653: unable to extend table sys.aud$ by 8192 in tablespac system[转载]
在用sqlplus user/password@truth登录数据库时报如下错误:ORA-00604: error occurred at recursive SQL level 1ORA-01653 ...
- 散列表(hash table)——算法导论(13)
1. 引言 许多应用都需要动态集合结构,它至少需要支持Insert,search和delete字典操作.散列表(hash table)是实现字典操作的一种有效的数据结构. 2. 直接寻址表 在介绍散列 ...
- React使用antd Table生成层级多选组件
一.需求 用户对不同的应用需要有不同的权限,用户一般和角色关联在一起,新建角色的时候会选择该角色对应的应用,然后对应用分配权限.于是写了一种实现的方式.首先应用是一个二级树,一级表示的是应用分组,二级 ...
- 创建几个常用table展示方式插件
这次和大家分享的是自己写的一个table常用几种展示格式的js插件取名为(table-shenniu),样式使用的是bootstrap.min.css,还需要引用jquery.min.js包,这个插件 ...
- html中table边框属性
1.向右(横向)合并: <td colspan="5"><span>后台管理系统</span></td> 2.向下(纵向)合并: & ...
- MySQL中You can't specify target table for update in FROM clause一场
mysql中You can't specify target table <tbl> for update in FROM clause错误的意思是说,不能先select出同一表中的某些值 ...
- 打印Lua的Table对象
小伙伴们再也不用为打印lua的Table对象而苦恼了, 本人曾也苦恼过,哈哈 不过今天刚完成了这个东西, 以前在网上搜过打印table的脚本,但是都感觉很不理想,于是,自己造轮子了~ 打印的效果,自己 ...
- React中使用Ant Table组件
一.Ant Design of React http://ant.design/docs/react/introduce 二.建立webpack工程 webpack+react demo下载 项目的启 ...
随机推荐
- TModJS:template
ylbtech-TModJS: 1.返回顶部 2.返回顶部 3.返回顶部 4.返回顶部 5.返回顶部 6.返回顶部 作者:ylbtech出处:http://ylbtech. ...
- Unreal引擎术语表
转自:http://www.cnblogs.com/hmxp8/archive/2012/02/10/2345274.html Unreal引擎术语表 转载自UDN: Actor - 一个可以放置在 ...
- CSS3新增的伪类
Element1 ~ element2:选择前面有element1的所有element2元素 [attr ^= val] 属性值以val开头的元素 [attr $= val] 属性值以val结尾的元素 ...
- 洛谷-铺地毯-NOIP2011提高组复赛
题目描述 为了准备一个独特的颁奖典礼,组织者在会场的一片矩形区域(可看做是平面直角坐标系的第一象限)铺上一些矩形地毯.一共有 n 张地毯,编号从 1 到n .现在将这些地毯按照编号从小到大的顺序平行于 ...
- Java探索之旅(4)——方法和Random&Math类
1.基本知识点 ❶方法在C++里面称为函数.调用方法时,应该类型兼容--即不需显式类型转换即可将形参传递给实参. ❷形参的改变不影响实参的值. ❸Java注重模块化设计和自顶向下的设 ...
- Struts2学习第七课 ActionSupport
com.opensymphony.xwork2.ActionSupport类是默认的Action类,如果某个Action节点没有配置class属性,则ActionSupport即为待执行的Action ...
- python远程登录Paramiko模块的安装
最近做云平台的项目,需要使用python来管理所有的主机,我选择了paramiko.它跨平台的,linux和window都可以使用,pssh只支持linux. 1:安装gcc和python-devel ...
- Firefox 网页 光标 闪烁
最近 Firefox 出现怪异情况:鼠标点击网页,在点击的位置显示光标,并一直闪烁,导致 Home End 等按键都无效. 原来这是 Firefox 的 “特色功能”:Caret Browsing,激 ...
- 经典DP 嵌套矩形 (南洋理工ACM—16)
本来是个很水的DP,结果被自己的代码习惯给打败了 代码: #include<iostream> #include<stdlib.h> #include<string.h& ...
- [CentOS7] 设置开机启动方式(图形界面或命令行)
由于CenOS之前一直都是通过修改inittab文件来修改开机启动模式,于是 通过 vim /etc/inittab 打开inittab来查看 如上所示,CentOS 7由于使用systemd而不是i ...
转到底部