Oracle Audit 應用實踐

liypsky發表於2010-12-16
例:針對某Table相關DML操作做Auditing

AUDIT SELECT TABLE,
INSERT TABLE,
DELETE TABLE,
EXECUTE PROCEDURE BY session/ACCESS WHENEVER SUCCESSFUL;
[@more@]

SELECT * FROM sys.aud$;
SELECT * FROM dba_audit_object;
SELECT * FROM dba_audit_trail WHERE username='user*' AND obj_name='SB_SALES_LINES';
1 user APPS CN10188 2010/12/16 下午 04:16:37 SB SB_CUSTOMER_LINES 3 SELECT
2 user APPS CN10188 2010/12/16 下午 04:16:42 SB SB_CUSTOMER_LINES 3 SELECT
3 user APPS CN10188 2010/12/16 下午 04:16:45 SB SB_CUSTOMER_LINES 3 SELECT
4 user APPS CN10188 2010/12/16 下午 04:16:45 SB SB_CUSTOMER_LINES 7 DELETE
5 user APPS CN10188 2010/12/16 下午 04:16:45 SB SB_CUSTOMER_LINES 3 SELECT
6 user APPS CN10188 2010/12/16 下午 04:16:45 SB SB_CUSTOMER_LINES 7 DELETE

NOAUDIT EXECUTE PROCEDURE BY session/ACCESS WHENEVER SUCCESSFUL;
提示:
ORA-01718 BY ACCESS | SESSION clause not allowed for NOAUDIT
解決:
NOAUDIT SELECT TABLE,
INSERT TABLE,
DELETE TABLE,
EXECUTE PROCEDURE WHENEVER SUCCESSFUL;


附取消Auditing:
NOAUDIT session;
NOAUDIT session BY USER1, user2;
NOAUDIT DELETE ANY TABLE;
NOAUDIT SELECT TABLE, INSERT TABLE, DELETE TABLE,EXECUTE PROCEDURE;
NOAUDIT ALL; -- 取消所有statement
NOAUDIT ALL PRIVILEGES; -- 取消所有許可權
NOAUDIT ALL ON DEFAULT; -- 取消所有物件
NOAUDIT ROLE;

<embed>

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/678020/viewspace-1043171/,如需轉載,請註明出處,否則將追究法律責任。

相關文章