We can restore a table that we dropped unfortunately or knowingly by the help of below steps :
[oracle@localhost ~]$ sqlplus '/as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Fri Sep 6 10:38:48 2019
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup;
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size 2254952 bytes
Variable Size 503318424 bytes
Database Buffers 1627389952 bytes
Redo Buffers 4923392 bytes
Database mounted.
Database opened.
SQL> conn football/messi
Error accessing PRODUCT_USER_PROFILE
Warning: Product user profile information not loaded!
You may need to run PUPBLD.SQL as SYSTEM
Connected.
SQL> select * from tab;
TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
BARCELONA TABLE
MANCHESTERCITY TABLE
TOTTENHAM TABLE
SQL> drop table BARCELONA;
Table dropped.
SQL> drop table manchestercity;
Table dropped.
SQL> select original_name from dba_recyclebin;
ORIGINAL_NAME
--------------------------------
BARCELONA
MANCHESTERCITY
SQL> flashback table barcelona to before drop;
Flashback complete.
SQL> flashback table manchestercity to before drop;
Flashback complete.
SQL> select * from tab;
TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
BARCELONA TABLE
MANCHESTERCITY TABLE
TOTTENHAM TABLE
SQL>
No comments:
Post a Comment