Home > Database > Oracle > body text

How to recover data from accidentally deleted tables in Oracle?

Guanhui
Release: 2020-06-23 15:57:55
Original
3232 people have browsed it

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%';
Copy after login

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%')
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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 [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!