zoukankan      html  css  js  c++  java
  • [bbk5120] 第44集 第四章 Flashback Database 08

    Restoring Tables from the Recycle Bin

    • Restore dropped tables and dependent objects.
    • If multiple recyclye bin entries have the same original name:
      • Use qunique,system-generated names to restore a particular version.
      • When using original names,the restored table is last in,first out(LIFO)
    • Rename the original name if that name is currently used.
    FLASHBACK TABLE <table_name> TO REFORE DROP [RENAME TO <new_name>];

    Recycle Bin:Automatic Space Reclamation

    Recycle Bin:Manual Space Reclamation

    PURAGE {TABLE <table_name> | INDEX <index_name>}

    PURAGE TABLESPACE <ts_name> [USER <user_name>]

    PRUAGE [USER_|DBA_] RECYCLEBIN

    Bypassing the Recycle Bin

    DROP TABLE <table_name> [PURGE];
    DROP TABLESPACE <ts_name> [INCLUDING CONTENTS];
    DROP USER <user_name> [CASCADE];

    Security considerations for the recycle bin:

    ALTER SYSTEM SET RECYCLEBIN=OFF SCOPE=SPFILE;

    Querying the Recycle Bin

    SQL> l
      1  SELECT owner,original_name,object_name,type,ts_name,droptime,related,space
      2  FROM dba_recyclebin
      3* WHERE can_undrop = 'YES'
    SQL> /
    
    OWNER      ORIGINAL_NAME             OBJECT_NAME                    TYPE                      TS_NAME                        DROPTIME               RELATED      SPACE
    ---------- ------------------------- ------------------------------ ------------------------- ------------------------------ ------------------- ---------- ----------
    SCOTT      EMP1                      BIN$3Oa1+S5bGnvgQAAAAAA3aQ==$0 TABLE                     USERS                          2013-05-17:16:24:25      80370          8
    ARCER      T                         BIN$pfwr1Jtji5zgQPrc4kAI7Q==$0 TABLE                     USERS                          2011-06-18:19:55:16      74574          8
    ARCER      SYS_FBA_HIST_80587        BIN$3RJoV7r6XA7gQAAAAABh/A==$0 TABLE                                                    2013-05-19:20:32:21      80589
    U3         COMPOSITE1                BIN$3EgRsliwFWPgQAAAAABnMA==$0 TABLE                                                    2013-05-09:19:08:24      79684
    SQL> SELECT original_name,object_name,ts_name,droptime
      2  FROM user_recyclebin WHERE can_undrop = 'YES';
    
    no rows selected
    SQL> SHOW RECYCLEBIN

    Quiz

    When you flash back a dropped table,the recovered indexes,triggers,and constraints keep their recycle bin names.

    1、True

    2、False

  • 相关阅读:
    MySQLFront导入SQL文件报#1113错误解决
    LNMP1.3一键安装Linux环境,配置Nginx运行ThinkPHP3.2
    币胜网虚拟货币交易平台安装说明
    windows服务器详细安全设置
    WINDOWS SERVER 2008远程桌面端口修改方法
    mac终端ssh连接服务器 空闲的时候 连接断开
    FTP软件发送"AUTH TLS"提示 无法连接到服务器
    LNMP状态管理命令
    lnmp1.4环境FTP服务器的安装和使用
    springCloud
  • 原文地址:https://www.cnblogs.com/arcer/p/3101199.html
Copyright © 2011-2022 走看看