1, the drop table, how to recover
Copy Code code as follows:
CREATE TABLE ETL (ID number);
INSERT into ETL values (1);
Commit
drop table ETL;
If the drop table ETL Purge--no recovery is possible
The following table recovery is performed:
(1) to introduce the view for recovery: Dba_recyclebin
Sql> SELECT object_name,original_name,can_undrop,can_purge from Dba_recyclebin WHERE original_name= ' ETL ';
object_name Original_name Can Can
------------------------------ -------------------------------- --- ---
Bin$v0qznpbkrbieuax/mzb8ww==$0 ETL Yes Yes
Sql> CREATE TABLE ETL as SELECT * from "bin$v0qznpbkrbieuax/mzb8ww==$0";
Table has been created.
Sql> SELECT * from ETL;
Id
----------
1
Restore completed.
(2) Unable to restore the situation: drop table ETL purge;
Sql> CREATE TABLE ETL2 (NAME VARCHAR2 (10));
Table has been created.
Sql> INSERT into ETL2 VALUES (' TEST ');
1 lines have been created.
Sql> COMMIT;
Submit completed.
sql> DROP TABLE ETL2 PURGE;
The table has been deleted.
Sql> SELECT object_name,original_name,can_undrop,can_purge from Dba_recyclebin WHERE original_name= ' ETL2 ';
No rows selected
Sql>
2, the Update table recovery
Sql> SELECT sysdate from DUAL;
Sysdate
-------------------
2008-11-21 19:45:20
Sql> SELECT * from ETL;
Id
----------
1
sql> UPDATE ETL SET id=2;
1 rows have been updated.
Sql> SELECT * from ETL;
Id
----------
2
Sql> COMMIT;
Submit completed.
CREATE TABLE Test_bak
As
SELECT * FROM test as of TIMESTAMP To_timestamp (' 20081126 103435 ', ' yyyymmdd Hh24miss ');
Table has been created.
Sql> SELECT * from Etl_bak;
Id
----------
1
Sql>
Completes the restore of the Update table.