alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';

select sysdate from dual;

执行增删操作

alter system switch logfile;     切换当前的重做日志已以生成归档日志(相当于将之后的操作重新放到另一个日志中)

alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';      修改格式方便查看

select sequence#,first_time from v$log_history order by first-time desc;

归档日志默认放在/u01/app/oracle/flash_recovery_area/ORCL/archivelog

查看分析日志

select t.FIRST_TIME,t.NAME from v$archived_log t order by t.FIRST_TIME desc;

使用logminer分析数据

conn /as sysdba

execute dbma_logmnr.add_logfile(logfilename=>'/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2011-05_04/01_mf_1_12_6w0mmgmd_.arc',options=>dbms_logmnr.new);

启动logminer

execute dbms_logmnr.start_logmnr (options=>dbms_logmnr.dict_from_online_catalog);

把分析数据放入表中,并把表的权限授权给普通用户

create table logminer_20110504 tablespace BANK_TBS as select * from v$logmnr_contents;

grant select on logminer_20110504 to bankuser;

结束logminer分析

execute dbms_logmnr.end_logmnr;

查看分析日志结果

select t.timestamp,t.sql_redo,t.sql_undo from sys.logminer_20110504 t where t.seg_owner='BANKUSER' and t.sql_undo is not null;

最新文章

  1. C#批量插入数据到Sqlserver中的四种方式
  2. 如何封装JS ----》JS设计模式《------ 封装与信息隐藏
  3. [python]使用virtualenv处理python版本问题
  4. Road Construction(poj 3352)
  5. ByteBuffer
  6. 为VirtualBox里的Linux系统安装增强功能
  7. SRM 511 DIV1 500pt(DP)
  8. 项目打包 weblogic部署
  9. linux安装python使用的MySQLdb
  10. dedecms的入门使用
  11. RGB與CIELAB色彩空間轉換
  12. UTF编码检测
  13. Java 异常处理笔记
  14. JavaScript入门之Canvas(一): 2D Context
  15. Java面试题汇总
  16. Eclipse的调试功能的10个小窍门[转]
  17. AttributeError: module 'enum' has no attribute 'IntFlag'
  18. Linux下crontab计划任务使用详解
  19. eclipse导入maven项目, A resource exists with a different case: '/xxx'.
  20. linux用法总结

热门文章

  1. 国内npm镜像使用
  2. css选择器思维导图
  3. FPGA的GTP(aurora 协议)高速串行接口数据收发(转)
  4. 1085 PAT单位排行
  5. DevExpress ASP.NET v18.2新功能详解(三)
  6. Domination(概率DP)
  7. ESP8266上报数据到中国移动物联网平台HTTP
  8. jar安装
  9. swiper 组件的高度设置问题
  10. maven install中依赖关系打包failed