|
- select * from hr.employees where department_id=20;
- select * from dba_audit_policies;
- select * from tlogon;
- select * from tvalue;
- select * from dba_tablespaces;
- alter tablespace taudit rename to tbsaudit;
- create table tfga ( audit_time varchar2(50),
- audit_ipaddress varchar2(40),
- audit_user varchar2(30),
- audit_policy varchar2(30)) tablespace tbsaudit;
-
- create or replace procedure procfga
- (p_username varchar2,
- p_object varchar2,
- p_policy varchar2)
- is
- begin
- insert into tfga values( to_char(sysdate,'YYYY-MM-DD:HH24:MI:SS'),
- sys_context('userenv','ip_address'),
- sys_context('userenv','session_user'),
- p_policy );
- end;
- begin
- dbms_fga.add_policy(object_schema => 'HR',
- object_name => 'EMPLOYEES',
- policy_name => 'FGA_POLICY1',
- audit_condition => 'department_id=20',
- audit_column => 'salary,commission_pct',
- handler_schema => 'SYS',
- handler_module => 'PROCFGA',enable => true,
- statement_types => 'select');
- end;
-
-
- select * from dba_fga_audit_trail;
- select * from dba_views v where v.view_name='DBA_FGA_AUDIT_TRAIL';
- select * from dba_common_audit_trail order by extended_timestamp desc ;
- select * from tfga;
- select * from dba_stmt_audit_opts s where s.audit_option like '%VIEW%';
-
-
- audit create view by hr ;
复制代码
|
|