|
select * from dict where table_name like 'DBA%AUDIT%';
select * from DBA_OBJ_AUDIT_OPTS;
select * from DBA_STMT_AUDIT_OPTS;
select * from DBA_PRIV_AUDIT_OPTS;
select * from dba_audit_trail;
select * from dba_views v where v.view_name='DBA_AUDIT_TRAIL';
select * from dba_tables t where t.owner='SYS' and t.table_name='AUD$';
alter table aud$ move tablespace tbsaudit;
select * from dba_tables t where t.owner='SYS' and t.table_name='AUD$';
select * from dba_audit_trail;
truncate table aud$;
select * from dba_audit_trail where username='HR';
select * from tlogon;
select * from dba_source s where s.name='TRGLOGON';
--ing , ed
create or replace trigger trglogon
after logon on database
when ( user ='HR' )
begin
insert into tlogon values( to_char(sysdate,'YYYY-MM-DD HH24:MI:SS'),
sys_context('userenv','ip_address'),
sys_context('userenv','session_user'));
commit;
end;
select a.audit_option from DBA_STMT_AUDIT_OPTS a
minus
select b.privilege from DBA_PRIV_AUDIT_OPTS b ;
audit table ;
select a.audit_option from DBA_STMT_AUDIT_OPTS a
minus
select b.privilege from DBA_PRIV_AUDIT_OPTS b ;
select * from dba_audit_trail where username='HR' order by timestamp desc ;
select * from dba_stmt_audit_opts where audit_option='TABLE';
noaudit table;
audit table by hr by access whenever successful ;
alter user sh identified by oracle_4U account unlock;
grant select on hr.employees to sh ;
audit select on hr.employees by session ;
select * from DBA_OBJ_AUDIT_OPTS;
noaudit select on hr.employees;
audit select on hr.employees by access whenever successful ;
select * from dba_audit_trail where username='SYSTEM' order by timestamp desc ;
grant update(salary) on hr.employees to sh;
---audit update(salary) on hr.employees ;
grant select any table to sh ;
-----
audit select any table by sh by session whenever successful;
select * from DBA_PRIV_AUDIT_OPTS;
select * from dba_audit_trail where username='SH' order by timestamp desc ;
|
|