物件audit時的一個有用option:ON DEFAULT

warehouse發表於2009-04-28

在使用物件許可權審計時如果使用on default選項,有一下幾個方面需要注意:

1、設定on default之後,它僅對之後建立的物件生效

2、on default對之後建立的物件永遠生效,即使以後設定了noaudit all(或者其他)on default;除非單獨對某個物件設定noaudit all(或者其他)on object_name才能徹底取消on default選項引起的審計

3、使用view時,對錶和view同時記錄審計結果(union)

[@more@]

ON DEFAULT

Specify ON DEFAULT to establish the specified object options as default object options for subsequently created objects. After you have established these default auditing options, any subsequently created object is automatically audited with those options. The default auditing options for a view are always the union of the auditing options for the base tables of the view. You can see the current default auditing options by querying the ALL_DEF_AUDIT_OPTS data dictionary view.

When you change the default auditing options, the auditing options for previously created objects remain the same. You can change the auditing options for an existing object only by specifying the object in the ON clause of the AUDIT statement.

--===============================

example:

Setting Default Auditing Options: Example The following statement specifies default auditing options for objects created in the future:

AUDIT ALTER, GRANT, INSERT, UPDATE, DELETE
    ON DEFAULT; 

Any objects created later are automatically audited with the specified options that apply to them, if auditing has been enabled:

  • If you create a table, then Oracle Database automatically audits any ALTER, GRANT, INSERT, UPDATE, or DELETE statements issued against the table.

  • If you create a view, then Oracle Database automatically audits any GRANT, INSERT, UPDATE, or DELETE statements issued against the view.

  • If you create a sequence, then Oracle Database automatically audits any ALTER or GRANT statements issued against the sequence.

  • If you create a procedure, package, or function, then Oracle Database automatically audits any ALTER or GRANT statements issued against it.

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

相關文章