Friday , November 22 2024

Oracle Recover A Dropped Table

In today’s article, we will explain how we can recover a dropped table with Oracle Flashback.

If a table with certain constraints is dropped and then tried to be brought back with a flashback, all constraints except the Foreign Key come back, but the foreign key does not.

If a table is dropped with PURGE, it cannot be restored using the Flashback feature. The reason is that UNDO does not occur during the DROP process and we prevent the data from being thrown into the trash bin where we can return it. This table can only be restored from backup.

However, if it has not been deleted with PURGE, it can be restored as follows.

1. The table is dropped.

2. The table is queried and it is confirmed that it does not exist.

3. By querying the trash can, it is seen that the dropped table is there.

4. The table is recovered with the flashback table.

5. The table is queried and the data is seen.

If there are two paintings with the same name in the trash can, the one that was last thrown into the trash bin is returned. If we want to bring the old one, object_name is written in the table name.

Loading

About Onur ARDAHANLI

Leave a Reply

Your email address will not be published. Required fields are marked *