Sunday, March 29, 2009

Flashback Drop - Scenarios

1) Suppose there are two tables in the recycle bin with the same name – Emp. Which table will be reinstated when you use the flashback drop command?

The table that was dropped last (latest Drop time) will be reinstated. To reinstate the previously dropped table, use the recycle bin’s system generated name method.


2) When you undrop a table, what happens to the dependent objects like the constraints, indexes etc.

When you undrop a table, the dependent objects are not undropped. But those objects do exist, and you can rename them to their original names. The only exceptions are foreign key constraints, which are lost when a table is dropped.

Use the following statements to rename the various dependent objects

Alter table table_name rename constraint “recyclebin name” to constraint_name;
Alter index “recyclebin name” rename to index_name;
Alter trigger “recyclebin name” rename to trigger_name;

Thanks

No comments:

Followers

Powered By Blogger
 

Oracle Database Administration. Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com