flash backup table before drop

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:41

[size=11pt]SQL> drop table inv;[size=11pt]SQL> show recyclebin;[size=11pt]ORIGINAL NAME RECYCLEBIN NAME OBJECT TYPE DROP TIME[size=11pt]---------------- ------------------------------ ------------ -------------------[size=11pt]INV BIN$0zIqhEFlcprgQ4TQTwq2uA==$0 TABLE 2013-01-11:12:16:49
[size=11pt]SQL> select object_name, original_name, type[size=11pt]from recyclebin;[size=11pt]Here is the output:[size=11pt]OBJECT_NAME ORIGINAL_NAM TYPE[size=11pt]----------------------------------- ------------ -------------------------[size=11pt]BIN$0zIqhEFjcprgQ4TQTwq2uA==$0 INV_PK INDEX[size=11pt]BIN$0zIqhEFkcprgQ4TQTwq2uA==$0 INV_TRIG TRIGGER[size=11pt]BIN$0zIqhEFlcprgQ4TQTwq2uA==$0 INV TABLE
[size=11pt]SQL> flashback table inv to before drop;[size=11pt]SQL> select index_name from user_indexes where table_name='INV';[size=11pt]INDEX_NAME[size=11pt]-------------------------------------------------[size=11pt]BIN$0zIqhEFjcprgQ4TQTwq2uA==$0
[size=11pt]In this scenario, you have to rename the index:[size=11pt]SQL> alter index "BIN$0zIqhEFjcprgQ4TQTwq2uA==$0" rename to inv_pk;
[size=11pt]SQL> flashback table inv to before drop rename to inv_bef;

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】