botang 发表于 2017-12-6 20:39:27

第39次活动:2017-12-06(星期三晚上7:00-9:30)

alter user hr profile default;

select   t.tablespace_name
from dba_tables t
where t.owner='SYS' and t.table_name='AUD

;
-----
create tablespace tbsaudit datafile size 50M autoextend on ;

alter table aud$ move tablespace tbsaudit;

selectcount(*)from aud$;

select* from dba_priv_audit_optsorder by 3;

select* from dba_obj_audit_opts;

select* from dba_stmt_audit_opts;

noaudit create session;

audit create session by hr whenever successful;

select* from dba_views v
where v.view_name='DBA_AUDIT_TRAIL';

select* from dba_audit_trail at
   order byat.timestamp desc;
   

   create table hr.t05211_sys(anumber );
   
audit update   on hr.employees   ;

select* from v$xml_audit_trail
where lower(sql_text) like '%employees%'
   order by 6 desc;


select* from dba_common_audit_trail t where db_user='HR'
order byt.extended_timestamp desc;

by session和 by access 只有记录类型的区别,by session 也是行行都登记了:






select s.audit_optionfrom dba_stmt_audit_opts s
minus
select p.privilege   from dba_priv_audit_optsp ;

alter user sysman identified by oracle_4U;

alter user dbsnmp identified by oracle_4U;

----
select* from dba_priv_audit_optsorder by 3;

select* from dba_sys_privs p where p.grantee='HR';

audit select any table by hr by sessionwheneversuccessful;

select* from dba_common_audit_trail t where db_user='HR'
order byt.extended_timestamp desc;

noaudit select any table by hr;


audit select any table by hr by accesswheneversuccessful;

audit create any table by hr by accesswhenever notsuccessful;

audit table by hr ;

selects.user_name ,s.audit_optionfrom dba_stmt_audit_opts s
minus
select p.user_name, p.privilege   from dba_priv_audit_optsp ;

----
select* from dba_common_audit_trail t where db_user='HR'
order byt.extended_timestamp desc;

-----

select* from dba_audit_policies;

select* from dba_audit_policy_columns;







页: [1]
查看完整版本: 第39次活动:2017-12-06(星期三晚上7:00-9:30)