Home  >  Article  >  Database  >  How to recover data from accidentally deleted tables in Oracle?

How to recover data from accidentally deleted tables in Oracle?

Guanhui
GuanhuiOriginal
2020-06-23 15:57:553326browse

How to recover data from accidentally deleted tables in Oracle?

#How to recover data from accidentally deleted tables in Oracle?

First determine the time point when the data is deleted. If the time is incorrect, the retrieved data may be incomplete;

For example: the time I deleted is 2018-09-28 11 :30:00 to 2018-09-28 11:34:00, because I was not sure of the specific time, I chose 2018-09-28 11:30:00, and I did not do anything else in between (except this time deletion External) data insertion and deletion operations, so the data retrieved through this time point will not be incomplete

Then find the deleted data according to the time;

select * from AT_PP_WORKINSTRUCTION as of timestamp to_timestamp('2018-09-28 11:30:00', 'yyyy-mm-dd hh24:mi:ss') where Inst_Name_s like 'GL6%';

Through this sql: select * from table name of deleted data as of timestamp to_timestamp('time point before deleting data', 'yyyy-mm-dd hh24:mi:ss') Find the data before you deleted it, and then add the deletion conditions, such as where Inst_Name_s like 'GL6%' Find the deleted data

Finally insert the deleted data into the table of deleted data.

 insert into AT_PP_WORKINSTRUCTION (select * from AT_PP_WORKINSTRUCTION as of timestamp to_timestamp('2018-09-28 11:30:00', 'yyyy-mm-dd hh24:mi:ss') where   Inst_Name_s like 'GL6%')

Recommended tutorial: "Oracle Tutorial"

The above is the detailed content of How to recover data from accidentally deleted tables in Oracle?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn