Use of fine-grained oracle Auditing

Source: Internet
Author: User

Use of fine-grained oracle Auditing

Take the scott user's emp table as an Example

---- Add a policy

Begin

DBMS_FGA.ADD_POLICY (

Object_schema => 'Scott ',

Object_name => 'emp ',

Policy_name => 'mydomainy1 ',

Handler_schema => NULL,

Handler_module => NULL,

Enable => TRUE,

Statement_types => 'insert, UPDATE, delete ',

Audit_column_opts => DBMS_FGA.ANY_COLUMNS );

End;

---- Enable policy

Begin

DBMS_FGA.ENABLE_POLICY (

Object_schema => 'Scott ',

Object_name => 'emp ',

Policy_name => 'mydomainy1 ',

Enable => TRUE );

End;

Select * from dba_fga_audit_trail;

Select * from dba_audit_policies;

Select db_user, timestamp, SQL _text, SQL _bind from dba_fga_audit_trail; -- Audit Result

SELECT text FROM dba_Views where view_name = upper ('dba _ FGA_AUDIT_TRAIL '); -- view records

---- Deletion policy

Begin

Dbms_fga.drop_policy (

Object_schema => 'Scott ',

Object_name => 'emp ',

Policy_name => 'mydomainy1'

);

End;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.