ITPub博客

首页 > 数据库 > Oracle > 使用user_tab_modifications查看业务操作数据库记录

使用user_tab_modifications查看业务操作数据库记录

原创 Oracle 作者:eymit 时间:2016-11-25 15:57:39 0 删除 编辑


1.使用系统管理员用户刷新统计
exec DBMS_STATS.FLUSH_DATABASE_MONITORING_INFO;

2.在owner用户下查询已经存在记录,执行这些记录并清空
select 'exec dbms_stats.gather_table_stats(ownname =>  '||''''||''''||',tabname => '||''''||TABLE_NAME||''''||' ,cascade=>true,estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE,method_opt=> '||''''|| 'for all columns size 1' ||''''||' );'  from user_tab_modifications  t  where t.table_name not like '%MLOG$_%'


3.手动在页面上执行操作


4.使用系统管理员用户刷新统计
exec DBMS_STATS.FLUSH_DATABASE_MONITORING_INFO;

5.查询更新了哪些操作
select TABLE_NAME,INSERTS,UPDATES,DELETES,TIMESTAMP from user_tab_modifications  t  where t.table_name not like '%MLOG$_%'

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/21605631/viewspace-2129094/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2009-05-09

  • 博文量
    65
  • 访问量
    370806