Bo's Oracle Station

查看: 2784|回复: 0

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

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2017-12-6 20:39:27 | 显示全部楼层 |阅读模式
  1. alter user hr profile default;

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

  5. ;
  6. -----
  7. create tablespace tbsaudit datafile size 50M autoextend on ;

  8. alter table aud$ move tablespace tbsaudit;
  9.   
  10. select  count(*)  from aud$;

  11. select  * from dba_priv_audit_opts  order by 3;

  12. select  * from dba_obj_audit_opts;

  13. select  * from dba_stmt_audit_opts;

  14. noaudit create session;

  15. audit create session by hr whenever successful;

  16. select  * from dba_views v
  17.   where v.view_name='DBA_AUDIT_TRAIL';
  18.   
  19.   select  * from dba_audit_trail at
  20.    order by  at.timestamp desc;
  21.    
  22.   
  23.    create table hr.t05211_sys(a  number );
  24.    
  25. audit update   on hr.employees   ;

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


  29. select  * from dba_common_audit_trail t where db_user='HR'
  30. order by  t.extended_timestamp desc;
  31.   
复制代码

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

Screenshot.png




  1. select s.audit_option  from dba_stmt_audit_opts s
  2. minus
  3. select p.privilege   from dba_priv_audit_opts  p ;

  4. alter user sysman identified by oracle_4U;

  5. alter user dbsnmp identified by oracle_4U;

  6. ----
  7. select  * from dba_priv_audit_opts  order by 3;

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

  9. audit select any table by hr by session  whenever  successful;

  10. select  * from dba_common_audit_trail t where db_user='HR'
  11. order by  t.extended_timestamp desc;

  12. noaudit select any table by hr;


  13. audit select any table by hr by access  whenever  successful;

  14. audit create any table by hr by access  whenever not  successful;
复制代码
  1. audit table by hr ;

  2. select  s.user_name ,s.audit_option  from dba_stmt_audit_opts s
  3. minus
  4. select p.user_name, p.privilege   from dba_priv_audit_opts  p ;

  5. ----
  6. select  * from dba_common_audit_trail t where db_user='HR'
  7. order by  t.extended_timestamp desc;

  8. -----

  9. select  * from dba_audit_policies;

  10. select  * from dba_audit_policy_columns;





复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-3-29 16:50 , Processed in 0.041050 second(s), 27 queries .

快速回复 返回顶部 返回列表