There are two scenarios for solving this problem:
One: To recover according to time:
1, query the current time of the database (the purpose is to check whether the database time is similar to your computer time, to avoid different time and restore data to the wrong point in time)
Select To_char (sysdate, ' Yyyy-mm-dd hh24:mi:ss ') from dual;
2. Query data before deleting data point in time
SELECT * from table name as of timestamp To_timestamp (' 2016-08-11 16:12:11 ', ' yyyy-mm-dd hh24:mi:ss ');
(If there is no data, keep the time in advance)
3. Recovering data (exciting moments)
Flashback table name to timestamp to_timestamp (' 2016-08-11 16:12:11 ', ' yyyy-mm-dd hh24:mi:ss ');
Successful, data recovery success;
However, there may be problems, such as error: ORA-08189: Line movement is not enabled, can not flash back to the table;
Do not be afraid, this is very simple;
ALTER TABLE name enable row movement;
Then execute the above SQL again;
Second: Recover data based on database SCN
1, query the current database SCN number
Select Current_scn from V$database; (Can not be executed, switch to SYS user or System user query)
The current value of the query is: 91799986
2, reduce the SCN number query deleted table data (if no data continue to shrink SCN, because the database operation more than one person, the SCN number changes more, you can reduce the number of several)
SELECT * from table name as of SCN 91799980;
3. Recovering data
Flashback table name to SCN 91799980;
Recovery is complete. If error: ORA-08189: The line movement function is not enabled, the table cannot be flashed back;
Oracle Delete data by mistake