set echo off feed off ver off pages 0 spool audon.sql select ’audit select on ’||owner||’.’||object_name||’ by access;’ from dba_objects where object_type in (’VIEW’,’TABLE’) and owner in (’ORDADM’); spool off set echo on feed on ver on |
audit select on ORDADM.DOCTOR_ORDERS by access; audit select on ORDADM.GROUP_ORDER_ITEMS by access; audit select on ORDADM.GROUP_ORDER_MASTER by access; audit select on ORDADM.ORDERS by access; audit select on ORDADM.ORDERS_COSTS by access; audit select on ORDADM.ORDERS_SHEET_IMAGE by access; audit select on ORDADM.VITAL_SIGNS_REC by access; |
create table aud_summary ( obj_name varchar2(30), owner varchar2(30), hits number); |
insert into aud_summary select obj_name,owner,count(*) from dba_audit_object group by obj_name,owner; |
set echo off feed off ver off pages 0 spool audoff.sql select ’noaudit select on ’||owner||’.’||object_name|| ’ by access;’ from dba_objects where object_type in (’VIEW’,’TABLE’) and owner in (’ORDADM’); spool off set echo on feed on ver on |
delete sys.aud$ |
col obj_name form a30 col owner form a20 col hits form 99,990 selec obj_name,owner,hits from aud_summary; OBJ_NAME OWNER COUNT(*) ----------- ------------- ---------- DOCTOR_ORDERS ORDADM 30309 DRUG_STOCK PHARMACY 11094 GROUP_ORDER_ITEMS ORDADM 1030 GROUP_ORDER_MASTER ORDADM 1196 ORDERS ORDADM 40421 ORDERS_COSTS ORDADM 10109 |
表 | 行数 | 命中率 |
doctor_orders | 2052709 | 30309 |
drug_stock | 2511 | 11094 |
group_order_item | 3800 | 1030 |
group_order_master | 186 | 1196 |
orders | 1633010 | 40421 |
orders_costs | 2403214 | 10109 |