How Oracle restores deleted tables or table records __oracle

Source: Internet
Author: User
methods for Oracle to recover deleted tables or table records

article Category: Database

One: Recovery of tables

For accidentally deleted tables, as long as you do not use the Purge permanent deletion option, then recover from the flash back zone hope is very large. The general steps are:

1, from the Flash Back query deleted table

SELECT * FROM RecycleBin

2. Recovery of the execution table

Flashback table TB to before drop, where TB represents the name of the table you want to restore.

Second: Table Data recovery

For the mistakenly deleted table records, as long as there is no TRUNCATE statement, you can choose to restore the transaction according to the time of submission, the general steps are:

1, first from the Flashback_transaction_query view query, the view provided for the query table name, transaction submission time, Undo_sql and other fields.

For example: SELECT * from Flashback_transaction_query where table_name= ' TEST ';
2, the implementation of the table record recovery

Generally, queries are based on time, and the query statement mode is SELECT * from TB as of Timestamp to_timestamp (times, ' Yyyy-mm-dd hh24:mi:ss '); TB refers to the table name, time refers to a point

such as SELECT * from Scott.test as of timestamp to_timestamp (' 2009-12-11 20:53:57 ', ' yyyy-mm-dd hh24:mi:ss ');

If there is data, recovery is extremely simple, the statement is Flashback table TB to timestamp to_timestamp (time, ' yyyy-mm-dd hh24:mi:ss ');

such as flashback table Scott.test to timestamp to_timestamp (' 2009-12-11 20:47:30 ', ' yyyy-mm-dd hh24:mi:ss ');

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.