ITPub博客

首页 > 数据库 > Oracle > flashback version query

flashback version query

原创 Oracle 作者:wwjfeng 时间:2015-08-19 13:45:40 0 删除 编辑

--查询数据变更履历(flashback version query)
SELECT versions_startscn,
       versions_starttime,
       versions_endscn,
       versions_endtime,
       versions_xid,
       versions_operation,
       SESSION_ID
  FROM LOGIN_LOG
       VERSIONS BETWEEN TIMESTAMP TO_TIMESTAMP ('2014-08-21 18:30:00', 'YYYY-MM-DD HH24:MI:SS') AND TO_TIMESTAMP ('2014-08-21 18:50:00', 'YYYY-MM-DD HH24:MI:SS')
where VERSIONS_OPERATION is not null;

--查询表在时间点的状态
select * from mesprd.NCKITTINGMATERIAL as of timestamp to_timestamp('2011-09-22 12:39:01','YYYY-MM-DD HH24:MI:SS') WHERE machineName='DB123';

--flashback transaction query
SELECT start_scn,
       commit_scn,
       logon_user,
       operation,
       table_name,
       undo_sql
  FROM flashback_transaction_query
 WHERE xid = '002A001E001FEA1D'

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

请登录后发表评论 登录
全部评论

注册时间:2010-03-27

  • 博文量
    146
  • 访问量
    91650