zoukankan      html  css  js  c++  java
  • oracle 已提交误删除,恢复 闪回技术

    select versions_starttime, versions_endtime, versions_xid,
    versions_operation ,'insert into scott.a values('||id||','||name||')' --id和name是这个表的字段
    from scott.a versions between timestamp minvalue and maxvalue
    order by VERSIONS_endTIME,versions_starttime;。或者直接
    insert into t1 select * from t1 as
    of timestamp to_timestamp('2009-03-17 11:06:00','yyyy-mm-dd hh24:mi:ss') ;

    ----****重点 ****------
    SELECT *
    FROM FLASHBACK_TRANSACTION_QUERY
    where TABLE_OWNER = 'xxx'
    AND TABLE_NAME='cccc_cccc'
    AND START_TIMESTAMP <=TO_DATE('2020-11-23 20:30:00','yyyy-mm-dd hh24:mi:ss')
    AND START_TIMESTAMP >=TO_DATE('2020-11-23 20:00:00','yyyy-mm-dd hh24:mi:ss')
    AND OPERATION='DELETE'
    -- and table_name = 'cccc_cccc'
    -- and

    执行 UNDO_SQL 列的值即可;
    ----****重点 ****------


    --insert into "username"."tablename "("SERIALNO","SSBM","TCODE","CKBH","KCXH","WLBH","WLMC","WLPH","WLFL","TM","CKDJ","CKSL","CKJE","OPER","SYSL","WSYSL","INPUTDATE","ORDERH","FIRSTDATE","GYSDM","SCRQ","TNOTE","GMRKFLAG","STM","BZQ","CKDM","LLR") values ('9','100','105','CKZHGY-YCL20181006036','9','DC03000048','石墨.P1A(MP004).GDGZ0092','40417','1','001601230182','0','15','0','18801393','0','15',TO_DATE('06-OCT-18', 'DD-MON-RR'),'1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);

    select * from tablename where serialno='1-1';
    delete tablename where serialno='1-1';

  • 相关阅读:
    网络系列之
    网络系列之
    Linux命令系列之
    Linux命令系列之
    Linux命令系列之
    Linux命令系列之
    Linux命令系列之
    Linux命令系列之
    Linux命令系列之
    Linux命令系列之
  • 原文地址:https://www.cnblogs.com/Apeak/p/14027010.html
Copyright © 2011-2022 走看看