Recovery of table [closed]
Questions asking us to recommend or find a tool, library 开发者_StackOverflow中文版or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this questionHow to recover a deleted table on a production database, with and without using RMAN?
What version of Oracle is this? If it's 10G or above you can bring it back from the recyclebin. For example,
Flashback table bla to before drop;
Alternately, if you simply deleted the data you can get the data back using Flashback Query.
If you drop table you can find in recycle bin.
select object_name, original_name, type, can_undrop as "UND", can_purge as "PUR", droptime
from recyclebin;
If you have a dump/export of the data, you could re-import the table and data with the import (imp) or the Data Pump import (impdp) utility. Information on importing and exporting can be found here.
If the deletion occurred relatively recently, you could use Flashback Query to recover the data.
SQL> INSERT INTO EMP_TMP
(SELECT * FROM EMP AS OF TIMESTAMP ('14-FEB-11 10:00:00','DD-MON-YY HH24: MI: SS');
Here is a nice link about the feature. The length of the availability of the data will depend on your UNDO_RETENTION parameter as it essentially uses the undo information to create the snapshot of the data as it existed at that point in time.
精彩评论