create user adlfga identified by adlfga;
grant resource,connect to adlfga;
BEGIN DBMS_FGA.ADD_POLICY( object_schema => 'AE001T3',
object_name => 'ID_TICKET_DETAILS',
policy_name => 'TICKET_LPO_POLICY',
audit_condition => NULL,
audit_column => 'TICKET_LPO',
enable => true,
statement_types => ‘SELECT,INSERT,UPDATE,DELETE’
);
end;
conn adl_fga_handler/adl_fga_handler;
create table audit_event 2 (audit_event_no number);
create or replace procedure sp_audit(object_schema in varchar2,object_name in varchar2,policy_name in varchar2)ascount number;
begin
select nvl(max(audit_event_no),0) into count from audit_event;
insert into audit_event values (count+1); commit;
end;
select DB_USER,OS_USER,POLICY_NAME,SQL_TEXT, TIMESTAMP from dba_fga_audit_trail where POLICY_NAME='TICKET_LPO_POLICY';
No comments:
Post a Comment