Get the App
SLTechnology News&Howtos  ›  Database  › 

Add sample code for audit policies in oracle

Shulou Source: shulou.com Published: 2022-05-31 12:33:17 11月15日 Update

Editor to share with you oracle to add audit strategy sample code, I believe most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!

Show parameter audit_trail

Begin

Dbms_fga.add_policy (object_schema = > 'KDCC',---- owner

Object_name = > 'XJY_1',---- table name

Policy_name = > 'XJY_1_ACCESS',--- audit policy name, custom

Audit_condition = > 'audit conditions

Audit_column = > 'Centrum Murray-Audit column

Statement_types = > 'UPDATE'); -' INSERT, UPDATE, DELETE, SELECT'

End

-pay attention to the audit column, but if it is not included, it will not be audited, and if only one is included, it will be audited.

Begin

Dbms_fga.add_policy (

Object_schema = > 'KDCC'

Object_name = > 'XJY_1'

Policy_name = > 'XJY_1_ACCESS'

Audit_column = > 'bPermec'

-audit_condition = > 'Crun12'

Statement_types = > 'UPDATE'

-audit_column_opts = > DBMS_FGA.ALL_COLUMNS

-audit_trail = > 'DB'

);

End

Select a.extended_timestamp

A.db_user

A.os_user

A.userhost

A.object_name

A.sql_text

From dba_common_audit_trail a

Where object_name = 'XJY_1'

The above is all the content of the article "adding sample Code for Audit policies in oracle". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Audit policy article code example content time not much name most owner more condition knowledge industry information information channel channel reference learning Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia OPPO Reno Huawei vpn macOS