|
- 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;
-
- select count(*) from aud$;
-
- select * from dba_priv_audit_opts order 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 by at.timestamp desc;
-
-
- create table hr.t05211_sys(a number );
-
- 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 by t.extended_timestamp desc;
-
复制代码
by session 和 by access 只有记录类型的区别,by session 也是行行都登记了:
- select s.audit_option from dba_stmt_audit_opts s
- minus
- select p.privilege from dba_priv_audit_opts p ;
- alter user sysman identified by oracle_4U;
- alter user dbsnmp identified by oracle_4U;
- ----
- select * from dba_priv_audit_opts order by 3;
- select * from dba_sys_privs p where p.grantee='HR';
- audit select any table by hr by session whenever successful;
- select * from dba_common_audit_trail t where db_user='HR'
- order by t.extended_timestamp desc;
- noaudit select any table by hr;
- audit select any table by hr by access whenever successful;
- audit create any table by hr by access whenever not successful;
复制代码- audit table by hr ;
- select s.user_name ,s.audit_option from dba_stmt_audit_opts s
- minus
- select p.user_name, p.privilege from dba_priv_audit_opts p ;
- ----
- select * from dba_common_audit_trail t where db_user='HR'
- order by t.extended_timestamp desc;
- -----
- select * from dba_audit_policies;
- select * from dba_audit_policy_columns;
复制代码
|
|