{"id":9796,"date":"2017-02-17T15:09:40","date_gmt":"2017-02-17T14:09:40","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/oracle-12c-combining-flashback-drop-and-flashback-query\/"},"modified":"2017-02-17T15:09:40","modified_gmt":"2017-02-17T14:09:40","slug":"oracle-12c-combining-flashback-drop-and-flashback-query","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/oracle-12c-combining-flashback-drop-and-flashback-query\/","title":{"rendered":"Oracle 12c &#8211; Combining Flashback Drop and Flashback Query"},"content":{"rendered":"<h2>By William Sescu<\/h2>\n<p>If you think that Flashback Drop feature just brings back your table, then this is only half of the story. It does much more than that. Besides undropping the table, it also brings back your constraints, your indexes, your trigger, your grants and the statistics as well.<\/p>\n<p>The ugly part is, that the flashback drop brings back some strange object names e.g. your indexes and constraints with names like &#8220;BIN$&#8230;&#8221; or alike. Maybe something you don&#8217;t want. So why not combining the Flashback Drop with a Flashback Query on the Dictionary to get the old constraint and index names.<\/p>\n<p>Let&#8217;s setup a few objects in the SCOTT schema. But before we do that, we need to grant the user SCOTT some extra privileges.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">SQL&gt; grant execute on dbms_flashback to scott;\n\nGrant succeeded.\n\nSQL&gt; grant flashback on user_indexes to scott;\n\nGrant succeeded.\n\nSQL&gt; grant flashback on user_constraints to scott;\n\nGrant succeeded.\n\nSQL&gt; grant flashback on user_triggers to scott;\n\nGrant succeeded.<\/pre>\n<p>Now we can setup our objects for this test. I will create 2 tables, and few grants, a trigger and statistics. The goal is to have after the flashback to before drop, exactly the same object names afterwards for the table the index, the constraints and the trigger.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">SQL&gt; connect scott\/tiger\nConnected.\n\nSQL&gt; create table dbi_t\n  2  ( x int, constraint t_pk primary key(x),\n  3   y int, constraint check_x check(x&gt;0)\n  4  );\n\nTable created.\n\nSQL&gt; insert into dbi_t values (1,1);\n\n1 row created.\n\nSQL&gt; insert into dbi_t values (2,2);\n\n1 row created.\n\nSQL&gt; insert into dbi_t values (3,3);\n\n1 row created.\n\nSQL&gt; COMMIT;\n\nCommit complete.\n\nSQL&gt; create table dbi_audit\n  2  (x int, x_before int, y int, y_before int, z varchar2(10));\n\nTable created.\n\n\nSQL&gt; CREATE OR REPLACE TRIGGER dbi_after_update\n  2  AFTER INSERT OR UPDATE\n  3     ON DBI_T\n  4     FOR EACH ROW\n  5  DECLARE\n  6     v_z varchar2(10);\n  7  BEGIN\n  8     SELECT user INTO v_z FROM dual;\n  9     -- Insert record into audit table\n 10     INSERT INTO dbi_audit\n 11     ( x,\n 12       x_before,\n 13       y,\n 14       y_before,\n 15       z)\n 16     VALUES\n 17     ( :new.x,\n 18       :old.x,\n 19       :new.y,\n 20       :old.y,\n 21       v_z );\n 22* END;\n \/\n\nTrigger created.\n\n\nSQL&gt; insert into dbi_t values (4,4);\n\n1 row created.\n\nSQL&gt; commit;\n\nCommit complete.\n\nSQL&gt; insert into dbi_t values (5,5);\n\n1 row created.\n\nSQL&gt; commit;\n\nCommit complete.\n\nSQL&gt; update dbi_t set x=6 where y=5;\n\n1 row updated.\n\nSQL&gt; commit;\n\nCommit complete.\n\n\nSQL&gt; select * from dbi_t;\n\n         X          Y\n---------- ----------\n         1          1\n         2          2\n         3          3\n         4          4\n         6          5\n\nSQL&gt; select * from dbi_audit;\n\n         X   X_BEFORE          Y   Y_BEFORE Z\n---------- ---------- ---------- ---------- ----------\n         4                     4            SCOTT\n         5                     5            SCOTT\n         6          5          5          5 SCOTT\n\n\t\t \n\n\nSQL&gt; begin\n  2  DBMS_STATS.GATHER_TABLE_STATS (\n  3  ownname =&gt; '\"SCOTT\"',\n  4  tabname =&gt; '\"DBI_T\"',\n  5  estimate_percent =&gt; 100\n  6  );\n  7  end;\n  8  \/\n\nPL\/SQL procedure successfully completed.\n\nSQL&gt; begin\n  2  DBMS_STATS.GATHER_TABLE_STATS (\n  3  ownname =&gt; '\"SCOTT\"',\n  4  tabname =&gt; '\"DBI_AUDIT\"',\n  5  estimate_percent =&gt; 100\n  6  );\n  7  end;\n  8  \/\n\nPL\/SQL procedure successfully completed.\n\n\nSQL&gt; grant select on dbi_t to hr;\n\nGrant succeeded.\n\nSQL&gt; grant select on dbi_audit to hr;\n\nGrant succeeded.<\/pre>\n<p>Ok. So let&#8217;s take a look how is the current situation is right now.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">SQL&gt; select TABLE_NAME, LAST_ANALYZED\n  2  from user_tables\n  3  where TABLE_NAME in ('DBI_T','DBI_AUDIT');\n\nTABLE_NAME   LAST_ANALYZED\n------------ --------------------\nDBI_AUDIT    17-FEB-17\nDBI_T        17-FEB-17\n\nSQL&gt; select CONSTRAINT_NAME, CONSTRAINT_TYPE from user_constraints where table_name = 'DBI_T';\n\nCONSTRAINT_NAME                      C\n------------------------------------ -\nCHECK_X                              C\nT_PK                                 P\n\nSQL&gt; select index_name from user_indexes where table_name = 'DBI_T';\n\nINDEX_NAME\n------------------------------------\nT_PK\n\nSQL&gt; select GRANTEE, OWNER, TABLE_NAME, GRANTOR, PRIVILEGE from user_tab_privs\n  2  where table_name in ('DBI_T','DBI_AUDIT');\n\nGRANTEE        OWNER          TABLE_NAME           GRANTOR        PRIVILEGE\n-------------- -------------- -------------------- -------------- --------------------\nHR             SCOTT          DBI_AUDIT            SCOTT          SELECT\nHR             SCOTT          DBI_T                SCOTT          SELECT\n\nSQL&gt; select TRIGGER_NAME, TABLE_NAME, STATUS from user_triggers;\n\nTRIGGER_NAME             TABLE_NA STATUS\n------------------------ -------- --------\nDBI_AFTER_UPDATE         DBI_T    ENABLED<\/pre>\n<p>Everything looks good. Up to date statistics, trigger is enabled and no objects with &#8220;BIN$xx&#8221; or something. The next step is a quite important one for this demo. I am just saving the SCN number before the &#8220;drop table&#8221; into a variable. In the real world, you need to find the SCN number yourself, e.g. with the TIMESTAMP_TO_SCN function.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">SQL&gt; column SCN new_val S\nSQL&gt; select dbms_flashback.get_system_change_number SCN from dual;\n\n       SCN\n----------\n   1056212<\/pre>\n<p>After we got the SCN, we can drop the table and undrop it afterwards.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">SQL&gt; drop table dbi_t;\n\nTable dropped.\n\nSQL&gt; flashback table dbi_t to before drop;\n\nFlashback complete.<\/pre>\n<p>Let&#8217;s take a look how our constraints and index names look right now. Exactly\u00a0like expected. They have this ugly &#8220;BIN$xxx&#8221; names, but we want the old names back.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">SQL&gt; select CONSTRAINT_NAME, CONSTRAINT_TYPE from user_constraints where table_name = 'DBI_T';\n\nCONSTRAINT_NAME                      C\n------------------------------------ -\nBIN$SLt7vMNFZNbgU8k4qMDm6g==$0       C\nBIN$SLt7vMNGZNbgU8k4qMDm6g==$0       P\n\nSQL&gt; select index_name from user_indexes where table_name = 'DBI_T';\n\nINDEX_NAME\n------------------------------------\nBIN$SLt7vMNHZNbgU8k4qMDm6g==$0<\/pre>\n<p>The trick is now to invoke a Flashback Query on the dictionary. Flashback query on the dictionary is not 100% supported, but it works. I just save the current index name into the variable &#8220;I&#8221; and the old name into variable &#8220;OI&#8221;.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">SQL&gt; column index_name new_val I\nSQL&gt; select index_name from user_indexes where table_name = 'DBI_T';\n\nINDEX_NAME\n------------------------------------\nBIN$SLt7vMNHZNbgU8k4qMDm6g==$0\n\nSQL&gt; column index_name new_val OI\nSQL&gt; select index_name from user_indexes as of scn &amp;S\n  2  where table_name = 'DBI_T';\nold   1: select index_name from user_indexes as of scn &amp;S\nnew   1: select index_name from user_indexes as of scn    1056212\n\nINDEX_NAME\n------------------------------------\nT_PK<\/pre>\n<p>After I have the current and the old name in place, I can do an alter index and get my old name back.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">SQL&gt; alter index \"&amp;I\" rename to \"&amp;OI\";\nold   1: alter index \"&amp;I\" rename to \"&amp;OI\"\nnew   1: alter index \"BIN$SLt7vMNHZNbgU8k4qMDm6g==$0\" rename to \"T_PK\"\n\nIndex altered.\n\nSQL&gt; select index_name from user_indexes where table_name = 'DBI_T';\n\nINDEX_NAME\n------------------------------------\nT_PK<\/pre>\n<p>&nbsp;<\/p>\n<p>I will do now exactly the same for the constraints and the trigger.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">SQL&gt; column constraint_name new_val CC\nSQL&gt; select constraint_name from user_constraints where table_name = 'DBI_T' and CONSTRAINT_TYPE = 'C';\n\nCONSTRAINT_NAME\n------------------------------------\nBIN$SLt7vMNFZNbgU8k4qMDm6g==$0\n\nSQL&gt; column constraint_name new_val OCC\nSQL&gt; select constraint_name from user_constraints as of scn &amp;S where table_name = 'DBI_T' and CONSTRAINT_TYPE = 'C';\nold   1: select constraint_name from user_constraints as of scn &amp;S where table_name = 'DBI_T' and CONSTRAINT_TYPE = 'C'\nnew   1: select constraint_name from user_constraints as of scn    1056212 where table_name = 'DBI_T' and CONSTRAINT_TYPE = 'C'\n\nCONSTRAINT_NAME\n------------------------------------\nCHECK_X\n\n\nSQL&gt; alter table DBI_T RENAME CONSTRAINT \"&amp;CC\" TO \"&amp;OCC\";\nold   1: alter table DBI_T RENAME CONSTRAINT \"&amp;CC\" TO \"&amp;OCC\"\nnew   1: alter table DBI_T RENAME CONSTRAINT \"BIN$SLt7vMNFZNbgU8k4qMDm6g==$0\" TO \"CHECK_X\"\n\nTable altered.\n\nSQL&gt; column constraint_name new_val PC\nSQL&gt; select constraint_name from user_constraints where table_name = 'DBI_T' and CONSTRAINT_TYPE = 'P';\n\nCONSTRAINT_NAME\n------------------------------------\nBIN$SLt7vMNGZNbgU8k4qMDm6g==$0\n\nSQL&gt; column constraint_name new_val OPC\nSQL&gt; select constraint_name from user_constraints as of scn &amp;S where table_name = 'DBI_T' and CONSTRAINT_TYPE = 'P';\nold   1: select constraint_name from user_constraints as of scn &amp;S where table_name = 'DBI_T' and CONSTRAINT_TYPE = 'P'\nnew   1: select constraint_name from user_constraints as of scn    1056212 where table_name = 'DBI_T' and CONSTRAINT_TYPE = 'P'\n\nCONSTRAINT_NAME\n------------------------------------\nT_PK\n\n\nSQL&gt; alter table DBI_T RENAME CONSTRAINT \"&amp;PC\" TO \"&amp;OPC\";\nold   1: alter table DBI_T RENAME CONSTRAINT \"&amp;PC\" TO \"&amp;OPC\"\nnew   1: alter table DBI_T RENAME CONSTRAINT \"BIN$SLt7vMNGZNbgU8k4qMDm6g==$0\" TO \"T_PK\"\n\nTable altered.\n\nSQL&gt; col CONSTRAINT_NAME format a36\nSQL&gt; select CONSTRAINT_NAME, CONSTRAINT_TYPE from user_constraints where table_name = 'DBI_T';\n\nCONSTRAINT_NAME                      C\n------------------------------------ -\nCHECK_X                              C\nT_PK                                 P\n\nSQL&gt; col INDEX_NAME format a36\nSQL&gt; select index_name from user_indexes where table_name = 'DBI_T';\n\nINDEX_NAME\n------------------------------------\nT_PK\n\n\nSQL&gt; select TRIGGER_NAME, TABLE_NAME,STATUS from user_triggers;\n\nTRIGGER_NAME                     TABLE_NAME                       STATUS\n-------------------------------- -------------------------------- --------\nBIN$SLt7vMNIZNbgU8k4qMDm6g==$0   DBI_T                            ENABLED\n\nSQL&gt; column trigger_name new_val T\nSQL&gt; select trigger_name from user_triggers where table_name = 'DBI_T';\n\nTRIGGER_NAME\n--------------------------------\nBIN$SLt7vMNIZNbgU8k4qMDm6g==$0\n\nSQL&gt; column trigger_name new_val OT\nSQL&gt; select trigger_name from user_triggers as of scn &amp;S where table_name = 'DBI_T';\nold   1: select trigger_name from user_triggers as of scn &amp;S where table_name = 'DBI_T'\nnew   1: select trigger_name from user_triggers as of scn    1056212 where table_name = 'DBI_T'\n\nTRIGGER_NAME\n--------------------------------\nDBI_AFTER_UPDATE\n\nSQL&gt; alter trigger \"&amp;T\" RENAME TO \"&amp;OT\";\nold   1: alter trigger \"&amp;T\" RENAME TO \"&amp;OT\"\nnew   1: alter trigger \"BIN$SLt7vMNIZNbgU8k4qMDm6g==$0\" RENAME TO \"DBI_AFTER_UPDATE\"\n\nTrigger altered.\n\n\nSQL&gt; select TRIGGER_NAME, TABLE_NAME, STATUS from user_triggers;\n\nTRIGGER_NAME             TABLE_NAME             STATUS\n------------------------ ---------------------- --------\nDBI_AFTER_UPDATE         DBI_T                  ENABLED<\/pre>\n<p>The stats and the grants do come back automatically.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">SQL&gt; select TABLE_NAME, LAST_ANALYZED\n  2  from user_tables\n  3  where TABLE_NAME in ('DBI_T','DBI_AUDIT');\n\nTABLE_NAME   LAST_ANALYZED\n------------ --------------------\nDBI_AUDIT    17-FEB-17\nDBI_T        17-FEB-17\n\n\nSQL&gt; select GRANTEE, OWNER, TABLE_NAME, GRANTOR, PRIVILEGE from user_tab_privs\n  2  where table_name in ('DBI_T','DBI_AUDIT');\n\nGRANTEE        OWNER          TABLE_NAME           GRANTOR        PRIVILEGE\n-------------- -------------- -------------------- -------------- --------------------\nHR             SCOTT          DBI_AUDIT            SCOTT          SELECT\nHR             SCOTT          DBI_T                SCOTT          SELECT<\/pre>\n<p>&nbsp;<\/p>\n<h3>Conclusion<\/h3>\n<p>The Flashback Drop feature does not just bring back your table. It does much more, it brings back your grants, the trigger, the statistics, the indexes and the constraints as well. If you are lucky, you can even combine it with the Flashback Query to retrieve your old names for the indexes, constraints and triggers.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By William Sescu If you think that Flashback Drop feature just brings back your table, then this is only half of the story. It does much more than that. Besides undropping the table, it also brings back your constraints, your indexes, your trigger, your grants and the statistics as well. The ugly part is, that [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229,198],"tags":[524,209],"type_dbi":[],"class_list":["post-9796","post","type-post","status-publish","format-standard","hentry","category-database-administration-monitoring","category-database-management","tag-flashback","tag-oracle-12c"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Oracle 12c - Combining Flashback Drop and Flashback Query - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/oracle-12c-combining-flashback-drop-and-flashback-query\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Oracle 12c - Combining Flashback Drop and Flashback Query\" \/>\n<meta property=\"og:description\" content=\"By William Sescu If you think that Flashback Drop feature just brings back your table, then this is only half of the story. It does much more than that. Besides undropping the table, it also brings back your constraints, your indexes, your trigger, your grants and the statistics as well. The ugly part is, that [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/oracle-12c-combining-flashback-drop-and-flashback-query\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2017-02-17T14:09:40+00:00\" \/>\n<meta name=\"author\" content=\"Oracle Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Oracle Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-12c-combining-flashback-drop-and-flashback-query\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-12c-combining-flashback-drop-and-flashback-query\/\"},\"author\":{\"name\":\"Oracle Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"headline\":\"Oracle 12c &#8211; Combining Flashback Drop and Flashback Query\",\"datePublished\":\"2017-02-17T14:09:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-12c-combining-flashback-drop-and-flashback-query\/\"},\"wordCount\":452,\"commentCount\":0,\"keywords\":[\"flashback\",\"Oracle 12c\"],\"articleSection\":[\"Database Administration &amp; Monitoring\",\"Database management\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/oracle-12c-combining-flashback-drop-and-flashback-query\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-12c-combining-flashback-drop-and-flashback-query\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/oracle-12c-combining-flashback-drop-and-flashback-query\/\",\"name\":\"Oracle 12c - Combining Flashback Drop and Flashback Query - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2017-02-17T14:09:40+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-12c-combining-flashback-drop-and-flashback-query\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/oracle-12c-combining-flashback-drop-and-flashback-query\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/oracle-12c-combining-flashback-drop-and-flashback-query\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Oracle 12c &#8211; Combining Flashback Drop and Flashback Query\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\",\"name\":\"Oracle Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"caption\":\"Oracle Team\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Oracle 12c - Combining Flashback Drop and Flashback Query - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/oracle-12c-combining-flashback-drop-and-flashback-query\/","og_locale":"en_US","og_type":"article","og_title":"Oracle 12c - Combining Flashback Drop and Flashback Query","og_description":"By William Sescu If you think that Flashback Drop feature just brings back your table, then this is only half of the story. It does much more than that. Besides undropping the table, it also brings back your constraints, your indexes, your trigger, your grants and the statistics as well. The ugly part is, that [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/oracle-12c-combining-flashback-drop-and-flashback-query\/","og_site_name":"dbi Blog","article_published_time":"2017-02-17T14:09:40+00:00","author":"Oracle Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Oracle Team","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12c-combining-flashback-drop-and-flashback-query\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12c-combining-flashback-drop-and-flashback-query\/"},"author":{"name":"Oracle Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"headline":"Oracle 12c &#8211; Combining Flashback Drop and Flashback Query","datePublished":"2017-02-17T14:09:40+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12c-combining-flashback-drop-and-flashback-query\/"},"wordCount":452,"commentCount":0,"keywords":["flashback","Oracle 12c"],"articleSection":["Database Administration &amp; Monitoring","Database management"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/oracle-12c-combining-flashback-drop-and-flashback-query\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12c-combining-flashback-drop-and-flashback-query\/","url":"https:\/\/www.dbi-services.com\/blog\/oracle-12c-combining-flashback-drop-and-flashback-query\/","name":"Oracle 12c - Combining Flashback Drop and Flashback Query - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2017-02-17T14:09:40+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12c-combining-flashback-drop-and-flashback-query\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/oracle-12c-combining-flashback-drop-and-flashback-query\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12c-combining-flashback-drop-and-flashback-query\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Oracle 12c &#8211; Combining Flashback Drop and Flashback Query"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee","name":"Oracle Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","caption":"Oracle Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/9796","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=9796"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/9796\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=9796"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=9796"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=9796"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=9796"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}