Can you use “RENAME” instead of “FLASHBACK TABLE” to restore a table in Oracle?

dba.stackexchange https://dba.stackexchange.com/questions/89807

  •  13-12-2020
  •  | 
  •  

Question

Just a general question about flashback and the recycle bin in Oracle. I tried doing this on a demo oracle database I have but the recycle bin does not seem to want to be populated; and I want a quick answer.

One can do the following:

flashback table table_name to before drop;
alter index "BIN$U/9fvJKaASzgQKjAYAIWhw==$0" rename to sys_c1113050;

Can you do this then, to restore a table:

RENAME TABLE BIN$U/9fvJKaASzgQKjAYAIWhw==$0 TO TABLE_NAME
Was it helpful?

Solution

No you cannot. To restore a table from the recycle bin use flashback table <table_name> to before drop;

<table_name> is the original table name and not the object_name from the recycle bin.

Do not rename the table to restore it from the recycle bin!

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top