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.
  • 相关阅读:
    2018QBXT刷题游记(4)
    洛谷 P4302 字符串折叠 题解
    hdu5009 Paint Pearls 题解
    CF467C George and Job 题解
    洛谷P2622 关灯问题II 题解
    洛谷 P3049园林绿化 题解
    洛谷 P1064 金明的预算方案 题解
    洛谷P1979 华容道 题解
    2018QBXT刷题游记(3)
    2018QBXT刷题游记(2)
  • 原文地址:https://www.cnblogs.com/tomatoes-/p/6151282.html
Copyright © 2011-2022 走看看