zoukankan      html  css  js  c++  java
  • 【练习】flushback基于时间的闪回查询

    1.创建table t1

    15:19:41 SCOTT@ORA11GR2>create table t1 as select * from scott.emp;
    
    Table created.
    
    15:23:45 SCOTT@ORA11GR2>select table_name,tablespace_name from user_tables where table_name = 'T1';
    
    TABLE_NAME                     TABLESPACE_NAME
    ------------------------------ ------------------------------
    T1                             USERS

    2.drop table t1

    15:24:33 SCOTT@ORA11GR2>drop table t1;
    
    Table dropped.

    3.查看回收站和tab

    15:25:04 SCOTT@ORA11GR2>show recycle;
    ORIGINAL NAME    RECYCLEBIN NAME                OBJECT TYPE  DROP TIME
    ---------------- ------------------------------ ------------ -------------------
    T1               BIN$QSqfMdIlFhXgUwEAAH971w==$0 TABLE        2016-11-13:15:25:03
    15:25:09 SCOTT@ORA11GR2>select * from tab;
    
    TNAME                          TABTYPE  CLUSTERID
    ------------------------------ ------- ----------
    BIN$QSqfMdIlFhXgUwEAAH971w==$0 TABLE
    BONUS                          TABLE
    DEPT                           TABLE
    EMP                            TABLE
    EMP1                           TABLE
    SALGRADE                       TABLE
    
    6 rows selected.

    4.闪回查询

    15:25:55 SCOTT@ORA11GR2>flashback table t1 to before drop;
    
    Flashback complete.
    
    15:26:21 SCOTT@ORA11GR2>select * from tab;
    
    TNAME                          TABTYPE  CLUSTERID
    ------------------------------ ------- ----------
    BONUS                          TABLE
    DEPT                           TABLE
    EMP                            TABLE
    EMP1                           TABLE
    SALGRADE                       TABLE
    T1                             TABLE
    
    6 rows selected.
  • 相关阅读:
    程序设计网站综合
    .net 获取url的方法(转)
    制作简单的语音识别系统(阅读文章)
    创建 WPF 不规则窗口
    高斯消元法
    How many ways(DFS记忆化搜索)
    I NEED A OFFER!
    免费馅饼
    N^N(Leftmost Digit )
    Common Subsequence
  • 原文地址:https://www.cnblogs.com/tomatoes-/p/6151282.html
Copyright © 2011-2022 走看看