- 最后登录
- 2016-4-27
- 在线时间
- 84 小时
- 威望
- 87
- 金钱
- 846
- 注册时间
- 2012-2-22
- 阅读权限
- 50
- 帖子
- 101
- 精华
- 1
- 积分
- 87
- UID
- 253
|
2#
发表于 2013-12-24 13:36:59
本帖最后由 anbob 于 2013-12-24 13:43 编辑
take a example
- take a example
- anbob@ORA11204>create table tt(id int);
- anbob@ORA11204>insert into tt values(1);
- anbob@ORA11204>commit;
- anbob@ORA11204>audit delete table by anbob by access;
- anbob@ORA11204>delete tt where id=1;
- anbob@ORA11204>commit;
- anbob@ORA11204> select username, TIMESTAMP,owner,obj_name,ACTION_NAME from dba_audit_trail
- where timestamp>sysdate-1;
- USERNAME TIMESTAMP OWNER OBJ_NAME ACTION_NAME
- ---------------- --------- ---------- ----------------- ----------------------------
- ANBOB 24-DEC-13 LOGON
- ANBOB 24-DEC-13 SYSTEM AUDIT
- anbob@ORA11204>audit delete table by system by access;
- Audit succeeded.
- system@ORA11204>insert into anbob.tt values(1);
- system@ORA11204>commit;
- system@ORA11204>delete anbob.tt;
- system@ORA11204> select username, TIMESTAMP,owner,obj_name,ACTION_NAME from dba_audit_trail where timestamp>sysdate-1;
- USERNAME TIMESTAMP OWNER OBJ_NAME ACTION_NAME
- --------------- --------- -------------- ------------- ----------------
- SYSTEM 24-DEC-13 ANBOB TT DELETE
- SYSTEM 24-DEC-13 LOGON
- ANBOB 24-DEC-13 LOGON
- ...-- had truncated
- system@ORA11204>conn anbob/anbob
- Connected.
- anbob@ORA11204>insert into anbob.tt values(1);
- anbob@ORA11204>audit delete anytable by anbob by access;
- anbob@ORA11204>delete anbob.tt;
- anbob@ORA11204> select username, TIMESTAMP,owner,obj_name,ACTION_NAME from dba_audit_trail
- where timestamp>sysdate-1 order by 2;
- USERNAME TIMESTAMP OWNER OBJ_NAME ACTION_NAME
- --------------- ------------------- ------------- --------------- ------------------
- ...
- SYSTEM 2013-12-24 13:16:55 LOGON
- SYSTEM 2013-12-24 13:17:23 ANBOB TT DELETE
- ANBOB 2013-12-24 13:17:38 LOGON
- SYSTEM 2013-12-24 13:17:38 LOGOFF
- ANBOB 2013-12-24 13:17:58 SYSTEM AUDIT
- ANBOB 2013-12-24 13:18:09 ANBOB TT DELETE
复制代码 |
|