zoukankan      html  css  js  c++  java
  • OCP-1Z0-053-V12.02-56题

    56.You discover that your Recycle Bin contains two tables with the same name, MY_TABLE. You also

    have a table named MY_TABLE in your schema. You execute the following statement:

    FLASHBACK TABLE my_table TO BEFORE DROP RENAME TO my_table2;

    What will be the result of executing this statement?

    A. One of the tables is recovered from the Recycle Bin using a First In First Out (FIFO) approach.

    B. One of the tables is recovered from the Recycle Bin using a Last In First Out (LIFO) approach.

    C. Both the tables are recovered from the Recycle Bin with one table renamed to MY_TABLE2 and the

    other to a system-generated name.

    D. None of the tables are recovered from the Recycle Bin, and the statement returns an error.

    Answer: B

    答案解析:

    参考:http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_9012.htm#SQLRF54996


    At the completion of the Flashback Table operation, the data in table is consistent with table at the earlier time. However, FLASHBACK TABLE TO SCN or TIMESTAMPdoes not preserve rowids, and FLASHBACK TABLE TO BEFORE DROP does not recover referential constraints.


    参考:http://docs.oracle.com/cd/E11882_01/server.112/e25494/tables.htm#ADMIN11683


    Restoring Tables from the Recycle Bin

    Use the FLASHBACK TABLE ... TO BEFORE DROP statement to recover objects from the recycle bin. You can specify either the name of the table in the recycle bin or the original table name. An optional RENAME TO clause lets you rename the table as you recover it. The recycle bin name can be obtained from either the DBA_or USER_RECYCLEBIN view as shown in "Viewing and Querying Objects in the Recycle Bin". To use the FLASHBACK TABLE ... TO BEFORE DROP statement, you need the same privileges required to drop the table.

    The following example restores int_admin_emp table and assigns to it a new name:

    FLASHBACK TABLE int_admin_emp TO BEFORE DROP
       RENAME TO int2_admin_emp;

    The system-generated recycle bin name is very useful if you have dropped a table multiple times. For example, suppose you have three versions of theint2_admin_emp table in the recycle bin and you want to recover the second version. You can do this by issuing two FLASHBACK TABLE statements, or you can query the recycle bin and then flashback to the appropriate system-generated name, as shown in the following example. Including the create time in the query can help you verify that you are restoring the correct table.

    SELECT object_name, original_name, createtime FROM recyclebin;   
     
    OBJECT_NAME                    ORIGINAL_NAME   CREATETIME
    ------------------------------ --------------- -------------------
    BIN$yrMKlZaLMhfgNAgAIMenRA==$0 INT2_ADMIN_EMP  2006-02-05:21:05:52
    BIN$yrMKlZaVMhfgNAgAIMenRA==$0 INT2_ADMIN_EMP  2006-02-05:21:25:13
    BIN$yrMKlZaQMhfgNAgAIMenRA==$0 INT2_ADMIN_EMP  2006-02-05:22:05:53
     
    FLASHBACK TABLE "BIN$yrMKlZaVMhfgNAgAIMenRA==$0" TO BEFORE DROP;

  • 相关阅读:
    SpringBoot系统列 4
    SpringBoot系统列 3
    SpringBoot系统列 2
    SpringBoot系统列 1
    Nginx+Keepalived+Tomcat高可用负载均衡,Zookeeper集群配置,Mysql(MariaDB)搭建,Redis安装,FTP配置
    Java分布式集群,使用synchronized和Redis保证Job的原子性
    Linux 公网IP和内网IP,Dubbo提供者注册到了内网IP上怎么处理!
    SpringMvc自动任务调度之task实现项目源码,@Scheduled
    SFTP工具类
    Java代码实现文件添加数字签名、验证数字签名
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13316578.html
Copyright © 2011-2022 走看看