Peoplesoft XML Publisher Guide

Wednesday 21 August 2013

Retrieve Dropped table in Oracle

A small post explaining how to retrieve dropped table from Oracle database:

1) When a table is drop with the DROP Table command the table is still there in Recycle bin until it's purged explicitly. 

The recycle bin is actually a data dictionary table containing information about dropped objects. You can turn it ON or OFF as required. To check the status of recycle bin below is the SQL Statement

SQL> SHOW PARAMETER RECYCLEBIN;

NAME        TYPE      VALUE
————————————
recyclebin    string           on

To turn Off the recyclebin

SQL>ALTER SYSTEM set RECYCLEBIN=OFF; (In Oracle 10g)

2) Retrieve dropped table from recyclebin

SQL> select OBJECT_NAME, ORIGINAL_NAME, TYPE from recyclebin

ORIGINAL_NAME is the original table that is dropped.

SQL> FLASHBACK table table_name to before drop;

Also, Index name needs to be restored to their original names;

No comments:

Post a Comment