OCP 1Z0 053 230

来源:互联网 发布:阿里云国际版价格 2017 编辑:程序博客网 时间:2024/05/21 17:53
230.You plan to use Flashback Drop feature to recover a dropped table SALES_EMP. No other table with 
the same name exists in the schema. 
You query RECYCLEBIN and find multiple entries for the SALES_EMP table as follows: You then issue 
the following statement to recover the table: 

SQL> FLASHBACK TABLE sales_emp TO BEFORE DROP; 
What would be the outcome of the precedent statement? 
A. It retrieves the latest version of the table from the recycle bin 
B. It retrieves the oldest version of the table from the recycle bin 
C. It retrieves the version of the table for which undo information is available 
D. It returns an error because the table name is not specified as per the names in the OBJECT_NAME 
column 
Answer: A 

flash back drop table 采用后进先出的方式。

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 the int2_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:52BIN$yrMKlZaVMhfgNAgAIMenRA==$0 INT2_ADMIN_EMP  2006-02-05:21:25:13BIN$yrMKlZaQMhfgNAgAIMenRA==$0 INT2_ADMIN_EMP  2006-02-05:22:05:53FLASHBACK TABLE "BIN$yrMKlZaVMhfgNAgAIMenRA==$0" TO BEFORE DROP;


0 0