Thursday, March 11, 2010

flashback table

ora102@TEST4:/app/oracle/product/db/rdbms/log> sqlplus scott/tiger

SQL*Plus: Release 10.2.0.3.0 - Production on Sun Aug 3 14:57:17 2008

Copyright (c) 1982, 2006, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SQL> select * from tab;

TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
BIN$U4gkooULB1PgQLMKTWwM7A==$0 TABLE
BIN$U4iK63kw1zTgQLMKTWx98g==$0 TABLE
EMP TABLE
AAA TABLE

SQL>
SQL> show recyclebin
ORIGINAL NAME RECYCLEBIN NAME OBJECT TYPE DROP TIME
---------------- ------------------------------ ------------ -------------------
EMP BIN$U4iK63kw1zTgQLMKTWx98g==$0 TABLE 2008-08-03:14:32:03
TEST BIN$U4gkooULB1PgQLMKTWwM7A==$0 TABLE 2008-08-03:14:03:27

SQL> FLASHBACK TABLE TEST TO BEFORE DROP;

Flashback complete.

SQL> select * from tab;

TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
BIN$U4iK63kw1zTgQLMKTWx98g==$0 TABLE
TEST TABLE
EMP TABLE
AAA TABLE