nullnullOracle 审计audit 的技巧使用,追踪ora

系统 1963 0

新手发帖,很多方面都是刚入门,有错误的地方请大家见谅,欢迎批评指正

    create or replace package aa_pkg_monitor_business_sql is

  procedure pro_monitor_drop_policy(object_schema in varchar2);
  procedure pro_monitor_add_policy(object_schema in varchar2);

  procedure pro_monitor_drop_main;
  procedure pro_monitor_add_main;

    end;
/
create or replace package body aa_pkg_monitor_business_sql is

  /*
  truncate table  sys.fga_log$ ;
  select t.* from dba_fga_audit_trail t;
  */
  procedure pro_monitor_drop_policy(object_schema in varchar2) is
 
    cursor cur_del is
      select owner, table_name from dba_tables a where owner = object_schema;
 
  begin
    for v_cur in cur_del
    loop
      begin
        dbms_fga.drop_policy(object_schema => v_cur.owner, ---
                             object_name => v_cur.table_name, ---
                             policy_name => v_cur.table_name);
      exception
        when others then
          null;
      end;
    end loop;
  end pro_monitor_drop_policy;
  --------------------------------------------------------------------

  --------------------------------------------------------------------
  procedure pro_monitor_add_policy(object_schema in varchar2) is
 
    cursor cur_del is
      select owner, table_name
      from   dba_tables a
      where  owner = object_schema and
             a.table_name not like 'SRP%';
 
  begin
    for v_cur in cur_del
    loop
      begin
        dbms_fga.add_policy(object_schema => v_cur.owner, --
                            object_name => v_cur.table_name, --
                            policy_name => v_cur.table_name,
                            statement_types => 'SELECT,UPDATE,DELETE,INSERT',
                            enable => true);
     
      exception
        when others then
          null;
      end;
    end loop;
  end pro_monitor_add_policy;

    每日一道理
爱,有的时候不需要山盟海誓的承诺,但她一定需要细致入微的关怀与问候;爱,有的时候不需要梁祝化蝶的悲壮,但她一定需要心有灵犀的默契与投合;爱,有的时候不需要雄飞雌从的追随,但她一定需要相濡以沫的支持与理解。

  --------------------------------------------------------------------

  --------------------------------------------------------------------
  procedure pro_monitor_drop_main is
  begin
    pro_monitor_drop_policy('CCARE');
    pro_monitor_drop_policy('CRMPUB');
    pro_monitor_drop_policy('INVENTORY');
    pro_monitor_drop_policy('ISAP');
    pro_monitor_drop_policy('OSMS');
    pro_monitor_drop_policy('ECARE');
    pro_monitor_drop_policy('CHANNEL');
  end pro_monitor_drop_main;

  --------------------------------------------------------------------

  --------------------------------------------------------------------
  --------------------------------------------------------------------

  --------------------------------------------------------------------
  procedure pro_monitor_add_main is
  begin
 
    pro_monitor_drop_main;
 
    pro_monitor_add_policy('CCARE');
   -- pro_monitor_add_policy('CRMPUB');
    pro_monitor_add_policy('INVENTORY');
    --pro_monitor_add_policy('ISAP');
    ---pro_monitor_add_policy('OSMS');
 
  end pro_monitor_add_main;

    end;
/

文章结束给大家分享下程序员的一些笑话语录: 联想——对内高价,补贴对外倾销的伟大“民族”企业。

nullnullOracle 审计audit 的技巧使用,追踪oracle后台数据库的DML动作


更多文章、技术交流、商务合作、联系博主

微信扫码或搜索:z360901061

微信扫一扫加我为好友

QQ号联系: 360901061

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描下面二维码支持博主2元、5元、10元、20元等您想捐的金额吧,狠狠点击下面给点支持吧,站长非常感激您!手机微信长按不能支付解决办法:请将微信支付二维码保存到相册,切换到微信,然后点击微信右上角扫一扫功能,选择支付二维码完成支付。

【本文对您有帮助就好】

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描上面二维码支持博主2元、5元、10元、自定义金额等您想捐的金额吧,站长会非常 感谢您的哦!!!

发表我的评论
最新评论 总共0条评论